Commits

illume committed 4ed9cb7

A fix for the SysFont hang on OS X 10.9 mentioned in issue #179

  • Participants
  • Parent commits 90f8019

Comments (0)

Files changed (1)

File lib/sysfont.py

     #  Not likely to be there on pre 10.4.x ...
     #    so still need to do other OSX specific method below.
     if os.path.exists("/usr/X11/bin/fc-list"):
-        fonts = initsysfonts_unix()
+        fonts = initsysfonts_unix("/usr/X11/bin/fc-list")
     else:
         fonts = {}
     
 
 
 #read the fonts on unix
-def initsysfonts_unix():
+def initsysfonts_unix(path = "fc-list"):
     import subprocess
 
     fonts = {}
 
     try:
         # note, we capture stderr so if fc-list isn't there to stop stderr printing.
-        flout, flerr = subprocess.Popen('fc-list : file family style', shell=True,
+        flout, flerr = subprocess.Popen('%s : file family style' % path, shell=True,
                                         stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                                         close_fds=True).communicate()
     except Exception: