Logo Search packages:      
Sourcecode: matplotlib version File versions

def matplotlib::font_manager::add_filename (   fontdict,
  prop,
  fname 
)

A function to add a font file name to the font dictionary using
the FontKey properties.  If a font property has no dictionary, then
create it.

Definition at line 469 of file font_manager.py.

00469                                        :
    """
    A function to add a font file name to the font dictionary using
    the FontKey properties.  If a font property has no dictionary, then
    create it.
    """
    try:
        size = str(float(prop.size))
    except ValueError:
        size = prop.size

    d = fontdict.                    \
        setdefault(prop.name,    {}).\
        setdefault(prop.style,   {}).\
        setdefault(prop.variant, {}).\
        setdefault(prop.weight,  {}).\
        setdefault(prop.stretch, {})
    d[size] = fname


def createFontDict(fontfiles, fontext='ttf'):


Generated by  Doxygen 1.6.0   Back to index