Qualified name: manimpango.fonts.FontDescription

class FontDescription(family=None, size=None, style=None, weight=None, variant=None)

A FontDescription describes a font.

This describes the characteristics of a font to load.


Reference to the C-implementation of font description.





Parse a string and form FontDescription from it.

property family: str

The family name of the font.

The family name represents a family of related font styles, and will resolve to a particular family. It is also possible to use a comma separated list of family names for this field.

classmethod from_string(string)

Parse a string and form FontDescription from it.

See for the syntax of the string.


string (str) – The string to be parsed.


The FontDescription that is based on the string.

Return type


property size: int

The size of the font of the text.

property style: Style

The style of the font of the text.

It should be one of Style. Most fonts will either have a italic style or an oblique style, but not both, and font matching in Pango will match italic specifications with oblique fonts and vice-versa if an exact match is not found.

property variant

The variant of the font of the text.

Should be one of Variant.

property weight: Weight

The weight of the font of the text.

The weight field specifies how bold or light the font should be. Should be one of Weight.