Method summary
- __init__(self, size = 12.0, weight = 'normal')
- findfont(self, prop, fontext = 'ttf')
- get_default_size(self)
- get_default_weight(self)
- set_default_size(self, size)
- set_default_weight(self, weight)
- update_fonts(self, filenames)
Methods
- __init__(self, size = 12.0, weight = 'normal')
- findfont(self, prop, fontext = 'ttf')
Search the font dictionary for a font that exactly or closely matches the specified font properties. See the FontProperties class for a description.
The properties are searched in the following order: name, style, variant, weight, stretch, and size. The font weight always matches returning the closest weight, and the font size always matches for scalable fonts. An oblique style font will be used inplace of a missing italic style font if present. See the W3C Cascading Style Sheet, Level 1 (CSS1; http://www.w3.org/TR/1998/REC-CSS2-19980512/) documentation for a description of the font finding algorithm.
- get_default_size(self)
Return the default font size.
- get_default_weight(self)
Return the default font weight.
- set_default_size(self, size)
Set the default font size in points. The initial value is 12pt.
- set_default_weight(self, weight)
Set the default font weight. The initial value is 'normal'.
- update_fonts(self, filenames)
Update the font dictionary with new font files. Currently not implemented.