Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 846b1dd

Browse files
committed
lookup cm
1 parent 7dd335e commit 846b1dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/mathtext.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,9 +863,10 @@ def _get_glyph(self, fontname, font_class, sym, fontsize, math=True):
863863

864864
g = self.cm_fallback._get_glyph(fontname, font_class, sym, fontsize)
865865
fname = g[0].family_name
866-
if fname.startswith("cm"):
866+
if fname in list(BakomaFonts._fontmap.values()):
867867
fname = "Computer Modern"
868-
_log.warning("Substituting symbol {} from {}".format(sym, fname))
868+
cbook._warn_external("Substituting symbol {} "
869+
"from {}".format(sym, fname), UserWarning)
869870
return g
870871

871872
else:

0 commit comments

Comments
 (0)