W Wrapl, The Programming Language

Libraries:Gtk:Pango:Font

Types

T

Inherits from:

Constants

Nil : T

Functions

DescriptionsFree(descs @ Std.Object.T, n_descs @ Std.Integer.SmallT) : Std.Object.T

Frees an array of font descriptions.

descs a pointer to an array of Gtk.Pango.FontDescription.T, may be NULL. [allow-none][array length=n_descs][transfer full]
n_descs number of font descriptions in descs


GetType() : Gtk.GObject.Type.T



Methods

:Describe(self @ T) : Gtk.Pango.FontDescription.T

Returns a description of the font, with font size set in points. Use DescribeWithAbsoluteSize if you want the font size in device units.

font a T
Returns a newly-allocated Gtk.Pango.FontDescription.T object.


:DescribeWithAbsoluteSize(self @ T) : Gtk.Pango.FontDescription.T

Returns a description of the font, with absolute font size set (in device units). Use Describe if you want the font size in points.

font a T
Returns a newly-allocated Gtk.Pango.FontDescription.T object.


:FindShaper(self @ T, language @ Gtk.Pango.Language.T, ch @ Std.Integer.SmallT) : Gtk.Pango.EngineShape.T

Finds the best matching shaper for a font for a particular language tag and character point.

font a T
language the language tag
ch a Unicode character.
Returns the best matching shaper.


:GetCoverage(self @ T, language @ Gtk.Pango.Language.T) : Gtk.Pango.Coverage.T

Computes the coverage map for a given font and language tag.

font a T
language the language tag
Returns a newly-allocated Gtk.Pango.Coverage.T object.


:GetFontMap(self @ T) : Gtk.Pango.FontMap.T

Gets the font map for which the font was created.

Note that the font maintains a weak reference to the font map, so if all references to font map are dropped, the font map will be finalized even if there are fonts created with the font map that are still alive. In that case this function will return NULL. It is the responsibility of the user to ensure that the font map is kept alive. In most uses this is not an issue as a Gtk.Pango.Context.T holds a reference to the font map.

font a T, or NULL
Returns the Gtk.Pango.FontMap.T for the font, or NULL if font is NULL. [transfer none]


:GetGlyphExtents(self @ T, glyph @ Std.Integer.SmallT, ink_rect @ Gtk.Pango.Rectangle.T, logical_rect @ Gtk.Pango.Rectangle.T) : Std.Object.T

Gets the logical and ink extents of a glyph within a font. The coordinate system for each rectangle has its origin at the base line and horizontal origin of the character with increasing coordinates extending to the right and down. The macros PANGO_ASCENT(), PANGO_DESCENT(), PANGO_LBEARING(), and PANGO_RBEARING() can be used to convert from the extents rectangle to more traditional font metrics. The units of the rectangles are in 1/PANGO_SCALE of a device unit.

If font is NULL, this function gracefully sets some sane values in the output variables and returns.

font a T
glyph the glyph index
ink_rect rectangle used to store the extents of the glyph as drawn or NULL to indicate that the result is not needed. [out][allow-none]
logical_rect rectangle used to store the logical extents of the glyph or NULL to indicate that the result is not needed. [out][allow-none]


:GetMetrics(self @ T, language @ Gtk.Pango.Language.T) : Gtk.Pango.FontMetrics.T

Gets overall metric information for a font. Since the metrics may be substantially different for different scripts, a language tag can be provided to indicate that the metrics should be retrieved that correspond to the script(s) used by that language.

If font is NULL, this function gracefully sets some sane values in the output variables and returns.

font a T
language language tag used to determine which script to get the metrics for, or NULL to indicate to get the metrics for the entire font. [allow-none]
Returns a Gtk.Pango.FontMetrics.T object. The caller must call Gtk.Pango.FontMetrics.Unref when finished using the object.