Skip to content

Commit

Permalink
BUG: Ignore X11 fonts on macOS
Browse files Browse the repository at this point in the history
X11 installations on macOS routinely include a `Vera.ttf` font that does not support Unicode.

Fixes #151
  • Loading branch information
rkern committed Jun 15, 2018
1 parent 3323236 commit 40e6899
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kiva/fonttools/font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,14 @@ def findSystemFonts(fontpaths=None, fontext='ttf'):
if len(ext) > 1 and ext[1:].lower() in fontexts:
fontfiles[f] = 1
else:
fontpaths = x11FontDirectory()
# check for OS X & load its fonts if present
if sys.platform == 'darwin':
fontpaths = []
for f in OSXInstalledFonts(fontext=fontext):
fontfiles[f] = 1
else:
# Otherwise, check X11.
fontpaths = x11FontDirectory()

for f in get_fontconfig_fonts(fontext):
fontfiles[f] = 1
Expand Down

0 comments on commit 40e6899

Please sign in to comment.