-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Cannot use many system fonts in matplotlib #15625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What does running |
Yikes, my fontconfig version is 2.6, and |
You can explicitly pass font paths: https://matplotlib.org/gallery/text_labels_and_annotations/font_file.html#sphx-glr-gallery-text-labels-and-annotations-font-file-py The reason for using --format=%{file} is essentially discussed at #2433 (diff). |
Bug report
Bug summary
I cannot use many of my system fonts inside matplotlib. If I specify a font family as an explicit argument, e.g.,
I get this message:
However, DejaVu Sans Condensed is definitely there on the system:
Same for some other fonts such as 'Nimbus Sans L'.
More (related) info
When I delete ~/.cache/matplotlib and start ipython, I get the following message:
The error message from fc-list makes me think that matplotlib cannot build its font cache.
Further, I tried probing matplotlib.font_manager directly.
However, if I try to get a list of fontconfig fonts, it returns empty:
Expected outcome
I should be able to use basic system fonts in matplotlib.
Matplotlib version
pip install matplotlib
)print(matplotlib.get_backend())
): TkAggThe text was updated successfully, but these errors were encountered: