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
gives 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"
findfont: Font family ['cursive'] not found. Falling back to DejaVu Sans.
Substituting with a symbol from Computer Modern.
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.
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.
it could stay as a reminder to add the discussed font list for mathtext
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?
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 matplotlib has a font cache and matplotlib.font_manager. So all that is needed is
For this Stack Overflow question the fix ended up being more subtle than just the font list cache, as I had more than just fontlist-v330.json in the matplotlib cache
$ ls -htra ~/.cache/matplotlib/
.. tex.cache fontlist-v330.json .
Activity
matthewfeickert commentedon Aug 22, 2020
@anntzer As you triaged this, can you comment on if there is any new information on this? Or if you have general thoughts?
andrzejnovak commentedon Aug 23, 2020
Hmm #16509 should have closed this I think, or it could stay as a reminder to add the discussed font list for mathtext
matthewfeickert commentedon Aug 23, 2020
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?
anntzer commentedon Aug 23, 2020
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?
andrzejnovak commentedon Aug 23, 2020
@anntzer this was largely fixed in #16509 and is not related to the mplhep issue
anntzer commentedon Aug 23, 2020
So you agree this can be closed? Or did I miss anything?
andrzejnovak commentedon Aug 23, 2020
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.
matthewfeickert commentedon Oct 30, 2020
For the record, the fix was incredibly easy and just total oversight on my part. I had forgotten that
matplotlibhas a font cache andmatplotlib.font_manager. So all that is needed isas I apparently had the correct fonts (I think all that is needed is the
dejavufont).matthewfeickert commentedon Jan 8, 2021
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
matthewfeickert commentedon Jan 8, 2021
For this Stack Overflow question the fix ended up being more subtle than just the font list cache, as I had more than just
fontlist-v330.jsonin thematplotlibcacheso rebuilding the font list cache with
or
wasn't sufficient. Instead the entire
matplotlibcache needs to be updated, which is most easily done withI'm not sure if there is a way from the
matplotlibAPI to clean and rebuild the entire cache though.