Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cffe0e commit 4afcaacCopy full SHA for 4afcaac
lib/matplotlib/font_manager.py
@@ -152,9 +152,11 @@ def list_fonts(directory, extensions):
152
recursively under the directory.
153
"""
154
extensions = ["." + ext for ext in extensions]
155
- return [str(path)
156
- for path in filter(Path.is_file, Path(directory).glob("**/*.*"))
157
- if path.suffix.lower() in extensions]
+ return [filename
+ # os.walk ignores access errors, unlike Path.glob.
+ for _, _, filenames in os.walk(directory)
158
+ for filename in filenames
159
+ if Path(filename).suffix.lower() in extensions]
160
161
162
def win32FontDirectory():
0 commit comments