PangoFc.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

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

cache_clear ()

config_changed ()

create_context ()

find_decoder (pattern)

set_default_substitute (func, *data)

shutdown ()

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 PangoFc.FontMap(**kwargs)
Bases:

Pango.FontMap

Abstract:

Yes

Structure:

PangoFc.FontMapClass

PangoFcFontMap is a base class for font map implementations using the Fontconfig and FreeType libraries.

It is used in the Xft and FreeType backends shipped with Pango, but can also be used when creating new backends. Any backend deriving from this base class will take advantage of the wide range of shapers implemented using FreeType that come with Pango.

cache_clear()

Clear all cached information and fontsets for this font map.

This should be called whenever there is a change in the output of the default_substitute() virtual function of the font map, or if fontconfig has been reinitialized to new configuration.

New in version 1.4.

config_changed()

Informs font map that the fontconfig configuration (i.e., fontconfig.Config object) used by this font map has changed.

This currently calls [method`PangoFc`.FontMap.cache_clear] which ensures that list of fonts, etc will be regenerated using the updated configuration.

New in version 1.38.

create_context()
Returns:

a new PangoContext

Return type:

Pango.Context

Creates a new context for this fontmap.

This function is intended only for backend implementations deriving from PangoFcFontMap; it is possible that a backend will store additional information needed for correct operation on the PangoContext after calling this function.

New in version 1.4.

Deprecated since version 1.22: Use Pango.FontMap.create_context() instead.

find_decoder(pattern)
Parameters:

pattern (fontconfig.Pattern) – The FcPattern to find the decoder for.

Returns:

a newly created PangoFcDecoder object or None if no decoder is set for pattern.

Return type:

PangoFc.Decoder or None

Finds the decoder to use for pattern.

Decoders can be added to a font map using [method`PangoFc`.FontMap.add_decoder_find_func].

New in version 1.26.

set_default_substitute(func, *data)
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.48.

shutdown()

Clears all cached information for the fontmap and marks all fonts open for the fontmap as dead.

See the shutdown() virtual function of PangoFcFont.

This function might be used by a backend when the underlying windowing system for the font map exits. This function is only intended to be called only for backend implementations deriving from PangoFcFontMap.

New in version 1.4.

substitute_changed()

Call this function any time the results of the default substitution function set with [method`PangoFc`.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.48.