Pango.Font_Map

Entities

Tagged Types

Access Types

Subprograms

Description

The Pango.Font_Map.Pango_Font_Map represents the set of fonts available for a particular rendering system. This is a virtual object with implementations being specific to particular rendering systems. To create an implementation of a Pango.Font_Map.Pango_Font_Map, the rendering-system specific code should allocate a larger structure that contains a nested Pango.Font_Map.Pango_Font_Map, fill in the <structfield>klass</structfield> member of the nested Pango.Font_Map.Pango_Font_Map with a pointer to a appropriate Pango_Font_Map_Class, then call pango_font_map_init on the structure.

The Pango.Font_Map.Pango_Font_Map structure contains one member which the implementation fills in.

An object that represents the set of fonts available for a particular rendering system

Changed

procedure Changed (Self : not null access Pango_Font_Map_Record)

Forces a change in the context, which will cause any Pango.Context.Pango_Context using this fontmap to change. This function is only useful when implementing a new backend for Pango, something applications won't do. Backends should call this function if they have attached extra data to the context and such data is changed. Since: gtk+ 1.34

Parameters
Self

Create_Context

function Create_Context
   (Self : not null access Pango_Font_Map_Record)
    return Pango.Context.Pango_Context

Creates a Pango.Context.Pango_Context connected to Fontmap. This is equivalent to Pango.Context.Gdk_New followed by pango_context_set_font_map. If you are using Pango as part of a higher-level system, that system may have it's own way of create a Pango.Context.Pango_Context. For instance, the GTK+ toolkit has, among others, gdk_pango_context_get_for_screen, and Gtk.Widget.Get_Pango_Context. Use those instead. Since: gtk+ 1.22

Parameters
Self
Return Value

the newly allocated Pango.Context.Pango_Context, which should be freed with g_object_unref.

Get_Serial

function Get_Serial
   (Self : not null access Pango_Font_Map_Record) return Guint

Returns the current serial number of Fontmap. The serial number is initialized to an small number larger than zero when a new fontmap is created and is increased whenever the fontmap is changed. It may wrap, but will never have the value 0. Since it can wrap, never compare it with "less than", always use "not equals". The fontmap can only be changed using backend-specific API, like changing fontmap resolution. This can be used to automatically detect changes to a Pango.Font_Map.Pango_Font_Map, like in Pango.Context.Pango_Context. Since: gtk+ 1.32.4

Parameters
Self
Return Value

The current serial number of Fontmap.

Get_Type

function Get_Type return Glib.GType
Return Value

List_Families

function List_Families
   (Self : not null access Pango_Font_Map_Record)
    return Pango_Font_Family_Array

List all families for a fontmap.

Parameters
Self
Return Value

Load_Font

function Load_Font
   (Self    : not null access Pango_Font_Map_Record;
    Context : not null access Pango.Context.Pango_Context_Record'Class;
    Desc    : Pango.Font.Pango_Font_Description)
    return Pango.Font.Pango_Font

Load the font in the fontmap that is the closest match for Desc.

Parameters
Self
Context

the Pango.Context.Pango_Context the font will be used with

Desc

a Pango.Font.Pango_Font_Description describing the font to load

Return Value

the newly allocated Pango.Font.Pango_Font loaded, or null if no font matched.

Load_Fontset

function Load_Fontset
   (Self     : not null access Pango_Font_Map_Record;
    Context  : not null access Pango.Context.Pango_Context_Record'Class;
    Desc     : Pango.Font.Pango_Font_Description;
    Language : Pango.Language.Pango_Language)
    return Pango.Fontset.Pango_Fontset

Load a set of fonts in the fontmap that can be used to render a font matching Desc.

Parameters
Self
Context

the Pango.Context.Pango_Context the font will be used with

Desc

a Pango.Font.Pango_Font_Description describing the font to load

Language

a Pango.Language.Pango_Language the fonts will be used for

Return Value

the newly allocated Pango.Fontset.Pango_Fontset loaded, or null if no font matched.

Pango_Font_Map

type Pango_Font_Map is access all Pango_Font_Map_Record'Class;

Pango_Font_Map_Record

type Pango_Font_Map_Record is new GObject_Record with null record;