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

Function _get_macos_fonts

lib/matplotlib/font_manager.py:268–275  ·  view source on GitHub ↗

Cache and list the font paths known to ``system_profiler SPFontsDataType``.

()

Source from the content-addressed store, hash-verified

266
267@cache
268def _get_macos_fonts():
269 """Cache and list the font paths known to ``system_profiler SPFontsDataType``."""
270 try:
271 d, = plistlib.loads(
272 subprocess.check_output(["system_profiler", "-xml", "SPFontsDataType"]))
273 except (OSError, subprocess.CalledProcessError, plistlib.InvalidFileException):
274 return []
275 return [Path(entry["path"]) for entry in d["_items"]]
276
277
278def findSystemFonts(fontpaths=None, fontext='ttf'):

Callers 1

findSystemFontsFunction · 0.85

Calls 1

PathClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…