PangoFT2.FontMap

g GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel GObject.Object GObject.Object Pango.FontMap Pango.FontMap GObject.Object->Pango.FontMap Gio.ListModel->Pango.FontMap PangoFc.FontMap PangoFc.FontMap Pango.FontMap->PangoFc.FontMap PangoFT2.FontMap PangoFT2.FontMap PangoFc.FontMap->PangoFT2.FontMap

Subclasses:

None

Methods

Inherited:

PangoFc.FontMap (7), Pango.FontMap (8), GObject.Object (37), Gio.ListModel (4)

Structs:

GObject.ObjectClass (5)

class

new ()

set_default_substitute (func, *data)

set_resolution (dpi_x, dpi_y)

substitute_changed ()

Virtual Methods

Inherited:

Pango.FontMap (6), GObject.Object (7), Gio.ListModel (3)

Properties

Inherited:

Pango.FontMap (2)

Signals

Inherited:

GObject.Object (1), Gio.ListModel (1)

Fields

Inherited:

GObject.Object (1), Gio.ListModel (1)

Class Details

class PangoFT2.FontMap(**kwargs)
Bases:

PangoFc.FontMap

Abstract:

No

The PangoFT2FontMap is the PangoFontMap implementation for FreeType fonts.

classmethod new()[source]
Returns:

the newly created fontmap object. Unref with GObject.Object.unref() when you are finished with it.

Return type:

Pango.FontMap

Create a new PangoFT2FontMap object.

A fontmap is used to cache information about available fonts, and holds certain global parameters such as the resolution and the default substitute function (see [method`PangoFT2`.FontMap.set_default_substitute]).

New in version 1.2.

set_default_substitute(func, *data)[source]
Parameters:

Sets a function that will be called to do final configuration substitution on a FcPattern before it is used to load the font.

This function can be used to do things like set hinting and antialiasing options.

New in version 1.2.

Deprecated since version 1.46: Use [method`PangoFc`.FontMap.set_default_substitute] instead.

set_resolution(dpi_x, dpi_y)[source]
Parameters:
  • dpi_x (float) – dots per inch in the X direction

  • dpi_y (float) – dots per inch in the Y direction

Sets the horizontal and vertical resolutions for the fontmap.

New in version 1.2.

substitute_changed()[source]

Call this function any time the results of the default substitution function set with PangoFT2.FontMap.set_default_substitute() change.

That is, if your substitution function will return different results for the same input pattern, you must call this function.

New in version 1.2.

Deprecated since version 1.46: Use [method`PangoFc`.FontMap.substitute_changed] instead.