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) nothrow
GType _getGType() static nothrow
GType _gType() @property nothrow
FontDescription self() nothrowReturns `this`, for use in `with` statements.
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.
string getFamily() nothrowGets the family name field of a font description.
pango.types.Gravity getGravity() nothrowGets the gravity field of a font description.
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.
int getSize() nothrowGets the size field of a font description.
bool getSizeIsAbsolute() nothrowDetermines whether the size of the font is in points (not absolute) or device units (absolute).
pango.types.Stretch getStretch() nothrowGets the stretch field of a font description.
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].
string getVariations() nothrowGets the variations field of a font description.
pango.types.Weight getWeight() nothrowGets the weight field of a font description.
uint hash() nothrowComputes a hash of a [pango.font_description.FontDescription] structure.
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 setFamily(string family) nothrowSets the family name field of a font description.
void setFamilyStatic(string family) nothrowSets the family name field of a font description, without copying the string.
void setGravity(pango.types.Gravity gravity) nothrowSets the gravity field of a font description.
void setSize(int size) nothrowSets the size field of a font description in fractional points.
void setStretch(pango.types.Stretch stretch) nothrowSets the stretch field of a font description.
void setStyle(pango.types.Style style) nothrowSets the style field of a [pango.font_description.FontDescription].
void setVariant(pango.types.Variant variant) nothrowSets the variant field of a font description.
void setVariations(string variations = null) nothrowSets the variations field of a font description.
void setVariationsStatic(string variations) nothrowSets the variations field of a font description.
void setWeight(pango.types.Weight weight) nothrowSets the weight field of a font description.
string toFilename() nothrowCreates a filename representation of a font description.
string toString_() nothrowCreates a string representation 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.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new font description structure with all fields unset. Returns: the newly allocated [pango.font_description.FontDescription], which should be freed using [pango.font_description.FontDescri...