FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix missing fontmap entries · matplotlib/matplotlib@c465e4c · GitHub

Repository navigation

Commit c465e4c

Browse files
committed
fix missing fontmap entries
1 parent d47ddcf commit c465e4c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎lib/matplotlib/_mathtext.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,13 @@ def __init__(self, default_font_prop: FontProperties, load_glyph_flags: LoadFlag
787787

788788
_slanted_symbols = set(r"\int \oint".split())
789789

790+
def _get_font(self, font: str | int) -> FT2Font:
791+
# work around, since we only populate 'mathfont' in the fontmap
792+
if not font in ('default', 'general'):
793+
font = 'mathfont'
794+
795+
return super()._get_font(font)
796+
790797
def _get_glyph(self, fontname: str, font_class: str,
791798
sym: str) -> tuple[FT2Font, int, bool]:
792799
# `fontname' is one of rm cal it tt sf bf bfit default bb frak scr regular

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL