-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Font/Mathfont and fallbacks buggy #14829
Comments
@anntzer As you triaged this, can you comment on if there is any new information on this? Or if you have general thoughts? |
Hmm #16509 should have closed this I think, or it could stay as a reminder to add the discussed font list for mathtext |
As discussed in scikit-hep/mplhep#178 (comment) I'm still seeing this on Ubuntu 19.10, but not on Debian buster. So this is a fonts issue on the user side.
So perhaps this is the best for the time being? |
I have nothing to add for now, I guess I'd need to try to repro the original bug report to know more but... not now :) Edit: I can't repro the issue here locally, and from the mplhep repo it's not clear either how to repro (without access to the specific distro), so I guess I'll close this for now as not actionable on our side, but feel free to request a reopen if you figure out if there's a font setup that easily reproes this? |
So you agree this can be closed? Or did I miss anything? |
Yeah, sorry. Should open a new issue to have a fallback lists for mathtext like for regular fonts. I still think that would be useful, but imo is low prio. |
For the record, the fix was incredibly easy and just total oversight on my part. I had forgotten that import matplotlib.font_manager
matplotlib.font_manager._rebuild() as I apparently had the correct fonts (I think all that is needed is the |
I ran into this again on Ubuntu 20.04 and I am unable to solve this like I did previously, so I made the following Stack Overflow question: matplotlib mathtext font warning: Font 'default' does not have a glyph |
For this Stack Overflow question the fix ended up being more subtle than just the font list cache, as I had more than just
so rebuilding the font list cache with import matplotlib.font_manager
matplotlib.font_manager._rebuild() or
wasn't sufficient. Instead the entire
I'm not sure if there is a way from the |
Bug report
Bug summary
Strange behaviour when trying to use non default fonts. Namely Arial.
gives
![image](https://user-images.githubusercontent.com/13226500/61367974-1f454800-a88d-11e9-86a2-492cb982d0d5.png)
Font 'default' does not have a glyph for '-' [U+2212], substituting with a dummy symbol.
and doesn't render right, fair enough.
Trying to fix it by setting mathtext, even though I would not expect it to have an effect since the font of the axis does change just by specifying
'font.sans-serif': "Arial"
Instead leads to
-
being replaced from cm:This seems to be inconsistent because it looks like when
'mathtext.fontset'' : 'custom',
regular font will fall back to math font which will the fall back to CM. If not changed, it does not fall back. It would be nice instead to be able to specify the fallback font manually.**
Matplotlib version
module://ipykernel.pylab.backend_inline
):The text was updated successfully, but these errors were encountered: