pango.font_description
Module for [FontDescription] class
class FontDescription
Types 1
A pango.font_description.FontDescription describes a font in an implementation-independent manner.
pango.font_description.FontDescription structures are used both to list what fonts are available on the system and also for specifying the characteristics of a font to load.
Methods
bool betterMatch(pango.font_description.FontDescription oldMatch, pango.font_description.FontDescription newMatch) nothrowDetermines if the style attributes of new_match are a closer match for desc than those of old_match are, or if old_match is null, determines if new_match is a match at all.pango.font_description.FontDescription copy() nothrowMake a copy of a [pango.font_description.FontDescription]. Returns: the newly allocated [pango.font_description.FontDescription], which should be freed with [pango.font_description.FontDescription....pango.font_description.FontDescription copyStatic() nothrowMake a copy of a [pango.font_description.FontDescription], but don't duplicate allocated fields.bool equal(pango.font_description.FontDescription desc2) nothrowCompares two font descriptions for equality.pango.types.FontMask getSetFields() nothrowDetermines which fields in a font description have been set. Returns: a bitmask with bits set corresponding to the fields in desc that have been set.bool getSizeIsAbsolute() nothrowDetermines whether the size of the font is in points (not absolute) or device units (absolute).pango.types.Style getStyle() nothrowGets the style field of a [pango.font_description.FontDescription].pango.types.Variant getVariant() nothrowGets the variant field of a [pango.font_description.FontDescription].void merge(pango.font_description.FontDescription descToMerge, bool replaceExisting) nothrowMerges the fields that are set in desc_to_merge into the fields in desc.void mergeStatic(pango.font_description.FontDescription descToMerge, bool replaceExisting) nothrowMerges the fields that are set in desc_to_merge into the fields in desc, without copying allocated fields.void setAbsoluteSize(double size) nothrowSets the size field of a font description, in device units.void setFamilyStatic(string family) nothrowSets the family name field of a font description, without copying the string.void setStyle(pango.types.Style style) nothrowSets the style field of a [pango.font_description.FontDescription].void setVariations(string variations = null) nothrowSets the variations field of a font description.void unsetFields(pango.types.FontMask toUnset) nothrowUnsets some of the fields in a [pango.font_description.FontDescription].pango.font_description.FontDescription fromString(string str) static nothrowCreates a new font description from a string representation.