The FontProperty class is a property descriptor used for defining theme properties whose values are font objects.
Rather than an actual font object, the corresponding attribute of a Theme object should contain a tuple (size, filename)
specifying the font. The first time the font property is accessed for a
given instance, the FontProperty descriptor loads the font using get_font and caches the resulting font object.
Constructor
- FontProperty(name)
- Constructs a font property descriptor. Normally name should be the same as the name being used for the property.
Example
class DramaticScene(Widget):
villain_gloat_font = FontProperty('villain_gloat_font')
from albow import theme
theme.root.DramaticScene = theme.Theme('DramaticScene')
theme.root.DramaticScene.villain_gloat_font = (27, "EvilLaughter.ttf")
---