MCPcopy
hub / github.com/matplotlib/matplotlib / _get_font

Method _get_font

lib/matplotlib/textpath.py:30–37  ·  view source on GitHub ↗

Find the `FT2Font` matching font properties *prop*, with its size set.

(self, prop)

Source from the content-addressed store, hash-verified

28 self._texmanager = None
29
30 def _get_font(self, prop):
31 """
32 Find the `FT2Font` matching font properties *prop*, with its size set.
33 """
34 filenames = _fontManager._find_fonts_by_props(prop)
35 font = get_font(filenames)
36 font.set_size(self.FONT_SCALE, self.DPI)
37 return font
38
39 def _get_hinting_flag(self):
40 return LoadFlags.NO_HINTING

Callers 2

get_text_pathMethod · 0.95

Calls 3

get_fontFunction · 0.90
_find_fonts_by_propsMethod · 0.80
set_sizeMethod · 0.45

Tested by

no test coverage detected