FontDescription

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.

Constructors

this
this()

Creates a new font description structure with all fields unset.

Members

Functions

betterMatch
bool betterMatch(pango.font_description.FontDescription oldMatch, pango.font_description.FontDescription newMatch)

Determines 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.

copy
pango.font_description.FontDescription copy()

Make a copy of a pango.font_description.FontDescription.

copyStatic
pango.font_description.FontDescription copyStatic()

Make a copy of a pango.font_description.FontDescription, but don't duplicate allocated fields.

equal
bool equal(pango.font_description.FontDescription desc2)

Compares two font descriptions for equality.

getFamily
string getFamily()

Gets the family name field of a font description.

getGravity
pango.types.Gravity getGravity()

Gets the gravity field of a font description.

getSetFields
pango.types.FontMask getSetFields()

Determines which fields in a font description have been set.

getSize
int getSize()

Gets the size field of a font description.

getSizeIsAbsolute
bool getSizeIsAbsolute()

Determines whether the size of the font is in points (not absolute) or device units (absolute).

getStretch
pango.types.Stretch getStretch()

Gets the stretch field of a font description.

getStyle
pango.types.Style getStyle()

Gets the style field of a pango.font_description.FontDescription.

getVariant
pango.types.Variant getVariant()

Gets the variant field of a pango.font_description.FontDescription.

getVariations
string getVariations()

Gets the variations field of a font description.

getWeight
pango.types.Weight getWeight()

Gets the weight field of a font description.

hash
uint hash()

Computes a hash of a pango.font_description.FontDescription structure.

merge
void merge(pango.font_description.FontDescription descToMerge, bool replaceExisting)

Merges the fields that are set in desc_to_merge into the fields in desc.

mergeStatic
void mergeStatic(pango.font_description.FontDescription descToMerge, bool replaceExisting)

Merges the fields that are set in desc_to_merge into the fields in desc, without copying allocated fields.

setAbsoluteSize
void setAbsoluteSize(double size)

Sets the size field of a font description, in device units.

setFamily
void setFamily(string family)

Sets the family name field of a font description.

setFamilyStatic
void setFamilyStatic(string family)

Sets the family name field of a font description, without copying the string.

setGravity
void setGravity(pango.types.Gravity gravity)

Sets the gravity field of a font description.

setSize
void setSize(int size)

Sets the size field of a font description in fractional points.

setStretch
void setStretch(pango.types.Stretch stretch)

Sets the stretch field of a font description.

setStyle
void setStyle(pango.types.Style style)

Sets the style field of a pango.font_description.FontDescription.

setVariant
void setVariant(pango.types.Variant variant)

Sets the variant field of a font description.

setVariations
void setVariations(string variations)

Sets the variations field of a font description.

setVariationsStatic
void setVariationsStatic(string variations)

Sets the variations field of a font description.

setWeight
void setWeight(pango.types.Weight weight)

Sets the weight field of a font description.

toFilename
string toFilename()

Creates a filename representation of a font description.

toString_
string toString_()

Creates a string representation of a font description.

unsetFields
void unsetFields(pango.types.FontMask toUnset)

Unsets some of the fields in a pango.font_description.FontDescription.

Static functions

fromString
pango.font_description.FontDescription fromString(string str)

Creates a new font description from a string representation.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.