PangoFT2.FontMap
Description: Reference for PangoFT2.FontMap

### Class

# PangoFT2FontMap

#### Description [src]

    final class PangoFT2.FontMap : PangoFc.FontMap
      implements Gio.ListModel {
      /* No available fields */
    }

The `PangoFT2FontMap` is the `PangoFontMap` implementation for FreeType fonts.

#### Ancestors

- PangoFcFontMap
- PangoFontMap
- GObject

#### Implements

- GListModel

#### Constructors

###### pango_ft2_font_map_new

Create a new `PangoFT2FontMap` object.

since: 1.2

#### Functions

###### pango_ft2_font_map_for_display

Returns a `PangoFT2FontMap`.

#### Instance methods

###### pango_ft2_font_map_create_context

Create a `PangoContext` for the given fontmap.

deprecated: 1.22 since: 1.2

###### pango_ft2_font_map_set_default_substitute

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

deprecated: 1.46 since: 1.2

###### pango_ft2_font_map_set_resolution

Sets the horizontal and vertical resolutions for the fontmap.

since: 1.2

###### pango_ft2_font_map_substitute_changed

Call this function any time the results of the default substitution function set with `pango_ft2_font_map_set_default_substitute()` change.

deprecated: 1.46 since: 1.2

##### Methods inherited from PangoFcFontMap (11)

###### pango_fc_font_map_add_decoder_find_func

This function saves a callback method in the `PangoFcFontMap` that will be called whenever new fonts are created.

###### pango_fc_font_map_cache_clear

Clear all cached information and fontsets for this font map.

###### pango_fc_font_map_config_changed

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

###### pango_fc_font_map_create_context

Creates a new context for this fontmap.

###### pango_fc_font_map_find_decoder

Finds the decoder to use for `pattern`.

###### pango_fc_font_map_get_config

Fetches the `FcConfig` attached to a font map.

###### pango_fc_font_map_get_hb_face

Retrieves the `hb_face_t` for the given `PangoFcFont`.

###### pango_fc_font_map_set_config

Set the `FcConfig` for this font map to use.

###### pango_fc_font_map_set_default_substitute

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

###### pango_fc_font_map_shutdown

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

###### pango_fc_font_map_substitute_changed

Call this function any time the results of the default substitution function set with `pango_fc_font_map_set_default_substitute()` change.

##### Methods inherited from PangoFontMap (9)

###### pango_font_map_add_font_file

Loads a font file with one or more fonts into the `PangoFontMap`.

###### pango_font_map_changed

Forces a change in the fontmap, which will cause any `PangoContext` using this fontmap to change.

###### pango_font_map_create_context

Creates a `PangoContext` connected to `fontmap`.

###### pango_font_map_get_family

Gets a font family by name.

###### pango_font_map_get_serial

Returns the current serial number of `fontmap`.

###### pango_font_map_list_families

List all families for a fontmap.

###### pango_font_map_load_font

Load the font in the fontmap that is the closest match for `desc`.

###### pango_font_map_load_fontset

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

###### pango_font_map_reload_font

Returns a new font that is like `font`, except that it is scaled by `scale`, its backend-dependent configuration (e.g. cairo font options) is replaced by the one in `context`, and its variations are replaced by `variations`.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GListModel (5)

###### g_list_model_get_item

Get the item at `position`.

###### g_list_model_get_item_type

Gets the type of the items in `list`.

###### g_list_model_get_n_items

Gets the number of items in `list`.

###### g_list_model_get_object

Get the item at `position`.

###### g_list_model_items_changed

Emits the `GListModel::items-changed` signal on `list`.

#### Properties

##### Properties inherited from PangoFontMap (2)

###### Pango.FontMap:item-type

The type of items contained in this list.

###### Pango.FontMap:n-items

The number of items contained in this list.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

##### Signals inherited from GListModel (1)

###### GListModel::items-changed

This signal is emitted whenever items were added to or removed from `list`. At `position`, `removed` items were removed and `added` items were added in their place.