예제 #1
0
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)
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
파일: font_demo.py 프로젝트: swipswaps/ipav
    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)
예제 #5
0
    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)
예제 #6
0
    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)
예제 #7
0
class Fonter:
    fonts_paths = CoreLabel.get_system_fonts_dir()
    # fonts_path = fonts_paths[1] + '\\'
    fonts_path = fonts_paths[0]