PgFontDescription

A PangoFontDescription describes a font in an implementation-independent manner.

PangoFontDescription 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(PangoFontDescription* pangoFontDescription, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(string family, int size)

Creates a nwe font description and set the family nd the size

this
this()

Creates a new font description structure with all fields unset.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

betterMatch
bool betterMatch(PgFontDescription oldMatch, PgFontDescription 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
PgFontDescription copy()

Make a copy of a PangoFontDescription.

copyStatic
PgFontDescription copyStatic()

Make a copy of a PangoFontDescription, but don't duplicate allocated fields.

equal
bool equal(PgFontDescription desc2)

Compares two font descriptions for equality.

free
void free()

Frees a font description.

getFamily
string getFamily()

Gets the family name field of a font description.

getGravity
PangoGravity getGravity()

Gets the gravity field of a font description.

getPgFontDescriptionStruct
PangoFontDescription* getPgFontDescriptionStruct(bool transferOwnership)

Get the main Gtk struct

getSetFields
PangoFontMask 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
PangoStretch getStretch()

Gets the stretch field of a font description.

getStruct
void* getStruct()

the main Gtk struct as a void*

getStyle
PangoStyle getStyle()

Gets the style field of a PangoFontDescription.

getVariant
PangoVariant getVariant()

Gets the variant field of a PangoFontDescription.

getVariations
string getVariations()

Gets the variations field of a font description.

getWeight
PangoWeight getWeight()

Gets the weight field of a font description.

hash
uint hash()

Computes a hash of a PangoFontDescription structure.

merge
void merge(PgFontDescription descToMerge, bool replaceExisting)

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

mergeStatic
void mergeStatic(PgFontDescription 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(PangoGravity 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(PangoStretch stretch)

Sets the stretch field of a font description.

setStyle
void setStyle(PangoStyle style)

Sets the style field of a PangoFontDescription.

setVariant
void setVariant(PangoVariant 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(PangoWeight 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(PangoFontMask toUnset)

Unsets some of the fields in a PangoFontDescription.

Static functions

fromString
PgFontDescription fromString(string str)

Creates a new font description from a string representation.

getType
GType getType()

Variables

ownedRef
bool ownedRef;
Undocumented in source.
pangoFontDescription
PangoFontDescription* pangoFontDescription;

the main Gtk struct

Meta