Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cdf4c1e

Browse files
authored
Merge pull request #13678 from anntzer/dupfonts
Fix font deduplication logic in createFontList.
2 parents f2e0479 + af9e511 commit cdf4c1e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/matplotlib/font_manager.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,6 @@ def createFontList(fontfiles, fontext='ttf'):
517517
fname = os.path.split(fpath)[1]
518518
if fname in seen:
519519
continue
520-
else:
521-
seen.add(fname)
522520
if fontext == 'afm':
523521
try:
524522
with open(fpath, 'rb') as fh:
@@ -551,6 +549,7 @@ def createFontList(fontfiles, fontext='ttf'):
551549
continue
552550

553551
fontlist.append(prop)
552+
seen.add(fname)
554553
return fontlist
555554

556555

0 commit comments

Comments
 (0)