Method summary
- __hash__(self)
- __init__(self, family = None, style = None, variant = None, weight = None, stretch = None, size = None, fname = None)
- __str__(self)
- copy(self)
- get_family(self)
- get_name(self)
- get_size(self)
- get_size_in_points(self, parent_size = None)
- get_stretch(self)
- get_style(self)
- get_variant(self)
- get_weight(self)
- set_family(self, family)
- set_name(self, names)
- set_size(self, size)
- set_stretch(self, stretch)
- set_style(self, style)
- set_variant(self, variant)
- set_weight(self, weight)
Methods
- __hash__(self)
- __init__(self, family = None, style = None, variant = None, weight = None, stretch = None, size = None, fname = None)
- __str__(self)
- copy(self)
Return a deep copy of self
- get_family(self)
Return a list of font names that comprise the font family.
- get_name(self)
Return the name of the font that best matches the font properties.
- get_size(self)
Return the font size.
- get_size_in_points(self, parent_size = None)
Return the size property as a numeric value. String values are converted to their corresponding numeric value.
- get_stretch(self)
Return the font stretch or width. Options are: normal, narrow, condensed, or wide.
- get_style(self)
Return the font style. Values are: normal, italic or oblique.
- get_variant(self)
Return the font variant. Values are: normal or small-caps.
- get_weight(self)
Return the font weight. See the FontProperties class for a a list of possible values.
- set_family(self, family)
Change the font family. Options are: serif, sans-serif, cursive, fantasy, or monospace.
- set_name(self, names)
Add one or more font names to the font family list. If the font name is already in the list, then the font is given a higher priority in the font family list. To change the font family, use the set_family() method.
- set_size(self, size)
Set the font size.
- set_stretch(self, stretch)
Set the font stretch or width. Options are: normal, narrow, condensed, or wide.
- set_style(self, style)
Set the font style. Values are: normal, italic or oblique.
- set_variant(self, variant)
Set the font variant. Values are: normal or small-caps.
- set_weight(self, weight)
Set the font weight. See the FontProperties class for a a list of possible values.