pango.font_description

Module for [FontDescription] class

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
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
FontDescription self()Returns `this`, for use in `with` statements.
bool betterMatch(pango.font_description.FontDescription oldMatch, pango.font_description.FontDescription newMatch)Determines if the style attributes of newmatch are a closer match for desc than those of oldmatch are, or if oldmatch is null, determines if newmatch is a match at all.
pango.font_description.FontDescription copy()Make a copy of a [pango.fontdescription.FontDescription]. Returns: the newly allocated [pango.fontdescription.FontDescription], which should be freed with [pango.font_description.FontDescription.fr...
pango.font_description.FontDescription copyStatic()Make a copy of a [pango.font_description.FontDescription], but don't duplicate allocated fields.
bool equal(pango.font_description.FontDescription desc2)Compares two font descriptions for equality.
string getFamily()Gets the family name field of a font description.
pango.types.Gravity getGravity()Gets the gravity field of a font description.
pango.types.FontMask getSetFields()Determines 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.
int getSize()Gets the size field of a font description.
bool getSizeIsAbsolute()Determines whether the size of the font is in points (not absolute) or device units (absolute).
pango.types.Stretch getStretch()Gets the stretch field of a font description.
pango.types.Style getStyle()Gets the style field of a [pango.font_description.FontDescription].
pango.types.Variant getVariant()Gets the variant field of a [pango.font_description.FontDescription].
string getVariations()Gets the variations field of a font description.
pango.types.Weight getWeight()Gets the weight field of a font description.
uint hash()Computes a hash of a [pango.font_description.FontDescription] structure.
void merge(pango.font_description.FontDescription descToMerge, bool replaceExisting)Merges the fields that are set in desctomerge into the fields in desc.
void mergeStatic(pango.font_description.FontDescription descToMerge, bool replaceExisting)Merges the fields that are set in desctomerge into the fields in desc, without copying allocated fields.
void setAbsoluteSize(double size)Sets the size field of a font description, in device units.
void setFamily(string family)Sets the family name field of a font description.
void setFamilyStatic(string family)Sets the family name field of a font description, without copying the string.
void setGravity(pango.types.Gravity gravity)Sets the gravity field of a font description.
void setSize(int size)Sets the size field of a font description in fractional points.
void setStretch(pango.types.Stretch stretch)Sets the stretch field of a font description.
void setStyle(pango.types.Style style)Sets the style field of a [pango.font_description.FontDescription].
void setVariant(pango.types.Variant variant)Sets the variant field of a font description.
void setVariations(string variations = null)Sets the variations field of a font description.
void setVariationsStatic(string variations)Sets the variations field of a font description.
void setWeight(pango.types.Weight weight)Sets the weight field of a font description.
string toFilename()Creates a filename representation of a font description.
string toString_()Creates a string representation of a font description.
void unsetFields(pango.types.FontMask toUnset)Unsets some of the fields in a [pango.font_description.FontDescription].
pango.font_description.FontDescription fromString(string str)Creates a new font description from a string representation.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new font description structure with all fields unset. Returns: the newly allocated [pango.fontdescription.FontDescription], which should be freed using [pango.fontdescription.FontDescript...