def OSXInstalledFonts(directory=None, fontext='ttf'):
 if (directory is None):
  directory = OSXFontDirectory()
 fontext = get_fontext_synonyms(fontext)
 files = []
 for path in directory:
  if (fontext is None):
   files.extend(glob.glob(os.path.join(path, '*')))
  else:
   for ext in fontext:
    files.extend(glob.glob(os.path.join(path, ('*.' + ext))))
    files.extend(glob.glob(os.path.join(path, ('*.' + ext.upper()))))
 return files

def OSXInstalledFonts ( directory = None , fontext = 'ttf' ) : if ( directory is None ) : directory = OSXFontDirectory ( ) fontext = get_fontext_synonyms ( fontext ) files = [ ] for path in directory : if ( fontext is None ) : files . extend ( glob . glob ( os . path . join ( path , '*' ) ) ) else : for ext in fontext : files . extend ( glob . glob ( os . path . join ( path , ( '*.' + ext ) ) ) ) files . extend ( glob . glob ( os . path . join ( path , ( '*.' + ext . upper ( ) ) ) ) ) return files
get list of font files on os x - ignores font suffix by default .