def get_font_list(): '''Get a list of all the fonts available on this system. ''' CoreLabel._fonts_dirs.append(FONTS_DIR) fonts_path = CoreLabel.get_system_fonts_dir() flist = [] resource_add_path(FONTS_DIR) for fdir in fonts_path: for fpath in sorted(os.listdir(fdir)): if fpath.endswith('.ttf'): flist.append(fpath[:-4]) return sorted(flist)
def get_font_list(self): '''Get a list of all the fonts available on this system. ''' fonts_path = CoreLabel.get_system_fonts_dir() flist = [] for fdir in fonts_path: for fpath in sorted(os.listdir(fdir)): if fpath.endswith('.ttf'): flist.append(fpath[:-4]) return sorted(flist)
def get_font_list(self): '''Get a list of all the fonts available on this system. ''' fonts_path = CoreLabel.get_system_fonts_dir() flist = [] for fdir in fonts_path: for fpath in sorted(os.listdir(fdir)): if fpath.endswith('.ttf'): flist.append(fpath[:-4]) return sorted(flist)
def get_font_list(self): """Get a list of all the fonts available on this system.""" fonts_path = CoreLabel.get_system_fonts_dir() flist = [] for fdir in fonts_path: for fpath in sorted(os.listdir(fdir)): if not "." in fpath: continue font, ext = fpath.rsplit(".") if ext == "ttf": flist.append(font) return sorted(flist)
def get_font_list(self): '''Get a list of all the fonts available on this system. ''' fonts_path = CoreLabel.get_system_fonts_dir() flist = [] for fdir in fonts_path: for fpath in sorted(os.listdir(fdir)): if not '.' in fpath: continue font, ext = fpath.rsplit('.') if ext == 'ttf': flist.append(font) return sorted(flist)
def get_font_list(self): '''Get a list of all the fonts available on this system. ''' fonts_path = CoreLabel.get_system_fonts_dir() flist = [] for fdir in fonts_path: for fpath in sorted(os.listdir(fdir)): if not '.' in fpath: continue font, ext = fpath.rsplit('.') if ext == 'ttf': flist.append(font) return sorted(flist)
class Fonter: fonts_paths = CoreLabel.get_system_fonts_dir() # fonts_path = fonts_paths[1] + '\\' fonts_path = fonts_paths[0]