You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FontProperties fail to roundtrip from their str #14977
FontProperties has a __str__ that appears to be intended to allow roundtripping (see use of get_fontconfig_pattern/parse_fontconfig_pattern), but after fp = FontProperties(); one has FontProperties(str(fp)) != fp.
(setting the style to (matplotlib's version of) seaborn has the side-effect of changing the default sans-serif font from dejavusans to arial, which leads to the difference in the result of findfont -- otherwise, the default sans-serif font is also dejavusans and both calls to findfont return it).
Actual outcome
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0
/usr/share/fonts/TTF/arial.ttf
:family=:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0
findfont: Font family [''] not found. Falling back to DejaVu Sans.
/home/antony/src/extern/matplotlib/lib/matplotlib/mpl-data/fonts/ttf/DejaVuSans.ttf
Expected outcome
Proper roundtripping.
Matplotlib version
Operating system: linux
Matplotlib version: master
Matplotlib backend (print(matplotlib.get_backend())): any
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Activity
github-actions commentedon Jun 26, 2023
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
QuLogic commentedon Jul 1, 2025
It seems like this is fixed; I get (after changing styles to
seaborn-v0_8):which looks consistent to me.
anntzer commentedon Jul 1, 2025
Likely this was fixed by #15601.