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

Skip to content

Commit c5717d9

Browse files
committed
Fix font caching bug on OSX
svn path=/trunk/matplotlib/; revision=4179
1 parent 2ab41d2 commit c5717d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/font_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def add(arg,directory,files):
172172
pass
173173
return fontpaths
174174

175-
def OSXInstalledFonts(directory=None, fontext=None):
175+
def OSXInstalledFonts(directory=None, fontext='ttf'):
176176
"""Get list of font files on OS X - ignores font suffix by default"""
177177
if directory is None:
178178
directory = OSXFontDirectory()
@@ -251,7 +251,7 @@ def findSystemFonts(fontpaths=None, fontext='ttf'):
251251
fontpaths = x11FontDirectory()
252252
# check for OS X & load its fonts if present
253253
if sys.platform == 'darwin':
254-
for f in OSXInstalledFonts():
254+
for f in OSXInstalledFonts(fontext=fontext):
255255
fontfiles[f] = 1
256256

257257
for f in get_fontconfig_fonts(fontext):

0 commit comments

Comments
 (0)