FontMetrics

A pango.font_metrics.FontMetrics structure holds the overall metric information for a font.

The information in a pango.font_metrics.FontMetrics structure may be restricted to a script. The fields of this structure are private to implementations of a font backend. See the documentation of the corresponding getters for documentation of their meaning.

For an overview of the most important metrics, see:

<picture> <source srcset="fontmetrics-dark.png" media="(prefers-color-scheme: dark)"> <img alt="Font metrics" src="fontmetrics-light.png"> </picture>

Constructors

this
this()

Create a font_metrics.FontMetrics boxed type.

this
this(void* ptr, Flag!"Take" take)

Members

Functions

_cPtr
void* _cPtr(Flag!"Dup" dup)
getApproximateCharWidth
int getApproximateCharWidth()

Gets the approximate character width for a font metrics structure.

getApproximateDigitWidth
int getApproximateDigitWidth()

Gets the approximate digit width for a font metrics structure.

getAscent
int getAscent()

Gets the ascent from a font metrics structure.

getDescent
int getDescent()

Gets the descent from a font metrics structure.

getHeight
int getHeight()

Gets the line height from a font metrics structure.

getStrikethroughPosition
int getStrikethroughPosition()

Gets the suggested position to draw the strikethrough.

getStrikethroughThickness
int getStrikethroughThickness()

Gets the suggested thickness to draw for the strikethrough.

getUnderlinePosition
int getUnderlinePosition()

Gets the suggested position to draw the underline.

getUnderlineThickness
int getUnderlineThickness()

Gets the suggested thickness to draw for the underline.

self
FontMetrics self()

Returns this, for use in with statements.

Properties

_gType
GType _gType [@property getter]

Static functions

_getGType
GType _getGType()

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

_getGType
GType _getGType()

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.