Logo Search packages:      
Sourcecode: matplotlib version File versions

def matplotlib::font_manager::get_fontconfig_fonts (   fontext = 'ttf'  ) 

Grab a list of all the fonts that are being tracked by fontconfig.
This is an easy way to grab all of the fonts the user wants to be made
available to applications, without knowing where all of them reside.

Definition at line 210 of file font_manager.py.

00210                                        :
    """Grab a list of all the fonts that are being tracked by fontconfig.
    This is an easy way to grab all of the fonts the user wants to be made
    available to applications, without knowing where all of them reside."""
    try:
        import commands
    except ImportError:
        return {}

    fontext = get_fontext_synonyms(fontext)

    fontfiles = {}
    status, output = commands.getstatusoutput("fc-list file")
    if status == 0:
        for line in output.split('\n'):
            fname = line.split(':')[0]
            if (os.path.splitext(fname)[1][1:] in fontext and
                os.path.exists(fname)):
                fontfiles[fname] = 1

    return fontfiles

def findSystemFonts(fontpaths=None, fontext='ttf'):


Generated by  Doxygen 1.6.0   Back to index