MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __init__

Method __init__

lib/matplotlib/_mathtext.py:705–724  ·  view source on GitHub ↗
(self, default_font_prop: FontProperties, load_glyph_flags: LoadFlags)

Source from the content-addressed store, hash-verified

703 _fontmap: dict[str, str] = {}
704
705 def __init__(self, default_font_prop: FontProperties, load_glyph_flags: LoadFlags):
706 # This must come first so the backend's owner is set correctly
707 if isinstance(self, DejaVuSerifFonts):
708 self._fallback_font = StixFonts(default_font_prop, load_glyph_flags)
709 else:
710 self._fallback_font = StixSansFonts(default_font_prop, load_glyph_flags)
711 self.bakoma = BakomaFonts(default_font_prop, load_glyph_flags)
712 TruetypeFonts.__init__(self, default_font_prop, load_glyph_flags)
713 # Include Stix sized alternatives for glyphs
714 self._fontmap.update({
715 '1': 'STIXSizeOneSym',
716 '2': 'STIXSizeTwoSym',
717 '3': 'STIXSizeThreeSym',
718 '4': 'STIXSizeFourSym',
719 '5': 'STIXSizeFiveSym',
720 })
721 for key, name in self._fontmap.items():
722 fullpath = findfont(name)
723 self.fontmap[key] = fullpath
724 self.fontmap[name] = fullpath
725
726 def _get_glyph(self, fontname: str, font_class: str,
727 sym: str) -> tuple[FT2Font, CharacterCodeType, bool]:

Callers

nothing calls this directly

Calls 5

StixFontsClass · 0.85
StixSansFontsClass · 0.85
BakomaFontsClass · 0.85
__init__Method · 0.45
updateMethod · 0.45

Tested by

no test coverage detected