From 40e68999928c725dd7217b5e0f3d328d0733443b Mon Sep 17 00:00:00 2001 From: Robert Kern Date: Fri, 15 Jun 2018 13:59:03 -0700 Subject: [PATCH] BUG: Ignore X11 fonts on macOS X11 installations on macOS routinely include a `Vera.ttf` font that does not support Unicode. Fixes #151 --- kiva/fonttools/font_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kiva/fonttools/font_manager.py b/kiva/fonttools/font_manager.py index e0aa18599..0e1886da3 100644 --- a/kiva/fonttools/font_manager.py +++ b/kiva/fonttools/font_manager.py @@ -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