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.
2 parents 07fa831 + f6e086b commit 158cf33Copy full SHA for 158cf33
lib/matplotlib/font_manager.py
@@ -565,7 +565,10 @@ def createFontList(fontfiles, fontext='ttf'):
565
except RuntimeError:
566
verbose.report("Could not parse font file %s"%fpath)
567
continue
568
- prop = afmFontProperty(fpath, font)
+ try:
569
+ prop = afmFontProperty(fpath, font)
570
+ except KeyError:
571
+ continue
572
else:
573
try:
574
font = ft2font.FT2Font(str(fpath))
@@ -576,7 +579,10 @@ def createFontList(fontfiles, fontext='ttf'):
576
579
verbose.report("Cannot handle unicode filenames")
577
580
#print >> sys.stderr, 'Bad file is', fpath
578
581
- prop = ttfFontProperty(font)
582
583
+ prop = ttfFontProperty(font)
584
585
586
587
fontlist.append(prop)
588
return fontlist
0 commit comments