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

Function list_fonts

lib/matplotlib/font_manager.py:191–201  ·  view source on GitHub ↗

Return a list of all fonts matching any of the extensions, found recursively under the directory.

(directory, extensions)

Source from the content-addressed store, hash-verified

189
190
191def list_fonts(directory, extensions):
192 """
193 Return a list of all fonts matching any of the extensions, found
194 recursively under the directory.
195 """
196 extensions = ["." + ext for ext in extensions]
197 return [os.path.join(dirpath, filename)
198 # os.walk ignores access errors, unlike Path.glob.
199 for dirpath, _, filenames in os.walk(directory)
200 for filename in filenames
201 if Path(filename).suffix.lower() in extensions]
202
203
204def win32FontDirectory():

Callers 1

findSystemFontsFunction · 0.85

Calls 2

PathClass · 0.85
joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…