Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ac20f76

Browse filesBrowse files
author
greg-roper
committed
Catch IO errors when building font cache
Problem seen on Windows machines where permission was denied when trying to load specific fonts (DINpro Light).
1 parent b1bab75 commit ac20f76
Copy full SHA for ac20f76

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎lib/matplotlib/font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,9 @@ def createFontList(fontfiles, fontext='ttf'):
591591
verbose.report("Cannot handle unicode filenames")
592592
# print >> sys.stderr, 'Bad file is', fpath
593593
continue
594+
except IOError:
595+
verbose.report("IO error - cannot open font file %s" % fpath)
596+
continue
594597
try:
595598
prop = ttfFontProperty(font)
596599
except (KeyError, RuntimeError, ValueError):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.