:right-sidebar: True FontMap =================================================================== .. currentmodule:: gi.repository.PangoFc .. class:: FontMap(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Pango.FontMap`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.ListModel` :Constructors: :: FontMap(**properties) Methods ------- .. rst-class:: interim-class .. class:: FontMap :no-index: .. method:: cache_clear() -> None 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. .. versionadded:: 1.4 .. method:: config_changed() -> None Informs font map that the fontconfig configuration (i.e., FcConfig object) used by this font map has changed. This currently calls :obj:`~gi.repository.PangoFc.FontMap.cache_clear` which ensures that list of fonts, etc will be regenerated using the updated configuration. .. versionadded:: 1.38 .. method:: create_context() -> ~gi.repository.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. .. versionadded:: 1.4 .. deprecated:: 1.22 Use :func:`~gi.repository.Pango.Pango.FontMap.create_context` instead. .. method:: find_decoder(pattern: ~gi.repository.fontconfig.Pattern) -> ~gi.repository.PangoFc.Decoder | None Finds the decoder to use for ``pattern``. Decoders can be added to a font map using :obj:`~gi.repository.PangoFc.FontMap.add_decoder_find_func`. .. versionadded:: 1.26 :param pattern: The ``FcPattern`` to find the decoder for. .. method:: set_default_substitute(func: ~typing.Callable[[...], None], *data: ~typing.Any) -> None 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. .. versionadded:: 1.48 :param func: function to call to to do final config tweaking on ``FcPattern`` objects :param data: data to pass to ``func`` .. method:: shutdown() -> None 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``. .. versionadded:: 1.4 .. method:: substitute_changed() -> None Call this function any time the results of the default substitution function set with :obj:`~gi.repository.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. .. versionadded:: 1.48