Pango.Font_Metrics

Entities

Tagged Types

Constants

Subprograms

Description

A Pango.Font_Metrics.Pango_Font_Metrics structure holds the overall metric information for a font (possibly 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.

From_Object

function From_Object (Object : System.Address) return Pango_Font_Metrics
Parameters
Object
Return Value

From_Object_Free

function From_Object_Free (B : access Pango_Font_Metrics'Class) return Pango_Font_Metrics
Parameters
B
Return Value

Get_Approximate_Char_Width

function Get_Approximate_Char_Width
   (Self : Pango_Font_Metrics) return Glib.Gint

Gets the approximate character width for a font metrics structure. This is merely a representative value useful, for example, for determining the initial size for a window. Actual characters in text will be wider and narrower than this.

Parameters
Self
Return Value

the character width, in Pango units.

Get_Approximate_Digit_Width

function Get_Approximate_Digit_Width
   (Self : Pango_Font_Metrics) return Glib.Gint

Gets the approximate digit width for a font metrics structure. This is merely a representative value useful, for example, for determining the initial size for a window. Actual digits in text can be wider or narrower than this, though this value is generally somewhat more accurate than the result of Pango.Font_Metrics.Get_Approximate_Char_Width for digits.

Parameters
Self
Return Value

the digit width, in Pango units.

Get_Ascent

function Get_Ascent (Self : Pango_Font_Metrics) return Glib.Gint

Gets the ascent from a font metrics structure. The ascent is the distance from the baseline to the logical top of a line of text. (The logical top may be above or below the top of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)

Parameters
Self
Return Value

the ascent, in Pango units.

Get_Descent

function Get_Descent (Self : Pango_Font_Metrics) return Glib.Gint

Gets the descent from a font metrics structure. The descent is the distance from the baseline to the logical bottom of a line of text. (The logical bottom may be above or below the bottom of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)

Parameters
Self
Return Value

the descent, in Pango units.

Get_Height

function Get_Height (Self : Pango_Font_Metrics) return Glib.Gint

Gets the line height from a font metrics structure. The line height is the distance between successive baselines in wrapped text. If the line height is not available, 0 is returned. Since: gtk+ 1.44

Parameters
Self
Return Value

the height, in Pango units

Get_Strikethrough_Position

function Get_Strikethrough_Position
   (Self : Pango_Font_Metrics) return Glib.Gint

Gets the suggested position to draw the strikethrough. The value returned is the distance above the baseline of the top of the strikethrough. Since: gtk+ 1.6

Parameters
Self
Return Value

the suggested strikethrough position, in Pango units.

Get_Strikethrough_Thickness

function Get_Strikethrough_Thickness
   (Self : Pango_Font_Metrics) return Glib.Gint

Gets the suggested thickness to draw for the strikethrough. Since: gtk+ 1.6

Parameters
Self
Return Value

the suggested strikethrough thickness, in Pango units.

Get_Type

function Get_Type return Glib.GType
Return Value

Get_Underline_Position

function Get_Underline_Position
   (Self : Pango_Font_Metrics) return Glib.Gint

Gets the suggested position to draw the underline. The value returned is the distance above the baseline of the top of the underline. Since most fonts have underline positions beneath the baseline, this value is typically negative. Since: gtk+ 1.6

Parameters
Self
Return Value

the suggested underline position, in Pango units.

Get_Underline_Thickness

function Get_Underline_Thickness
   (Self : Pango_Font_Metrics) return Glib.Gint

Gets the suggested thickness to draw for the underline. Since: gtk+ 1.6

Parameters
Self
Return Value

the suggested underline thickness, in Pango units.

Null_Pango_Font_Metrics

Null_Pango_Font_Metrics : constant Pango_Font_Metrics;

Pango_Font_Metrics

type Pango_Font_Metrics is new Glib.C_Boxed with null record;

Ref

function Ref (Self : Pango_Font_Metrics) return Pango_Font_Metrics

Increase the reference count of a font metrics structure by one.

Parameters
Self
Return Value

Metrics

Unref

procedure Unref (Self : Pango_Font_Metrics)

Decrease the reference count of a font metrics structure by one. If the result is zero, frees the structure and any associated memory.

Parameters
Self