:right-sidebar: True Fontset =================================================================== .. currentmodule:: gi.repository.Pango .. class:: Fontset(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Subclasses: :class:`~gi.repository.Pango.FontsetSimple` A ``PangoFontset`` represents a set of ``PangoFont`` to use when rendering text. A ``PangoFontset`` is the result of resolving a ``PangoFontDescription`` against a particular ``PangoContext``\. It has operations for finding the component font for a particular Unicode character, and for finding a composite set of metrics for the entire fontset. Methods ------- .. rst-class:: interim-class .. class:: Fontset :no-index: .. method:: do_foreach(self, func: ~typing.Callable[[~gi.repository.Pango.Fontset, ~gi.repository.Pango.Font, ~typing.Any], bool], data: ~typing.Any = None) -> None :param func: :param data: .. method:: do_get_font(self, wc: int) -> ~gi.repository.Pango.Font :param wc: .. method:: do_get_language(self) -> ~gi.repository.Pango.Language .. method:: do_get_metrics(self) -> ~gi.repository.Pango.FontMetrics .. method:: foreach(func: ~typing.Callable[[~gi.repository.Pango.Fontset, ~gi.repository.Pango.Font, ~typing.Any], bool], data: ~typing.Any = None) -> None Iterates through all the fonts in a fontset, calling ``func`` for each one. If ``func`` returns :const:`True`, that stops the iteration. .. versionadded:: 1.4 :param func: Callback function :param data: data to pass to the callback function .. method:: get_font(wc: int) -> ~gi.repository.Pango.Font Returns the font in the fontset that contains the best glyph for a Unicode character. :param wc: a Unicode character .. method:: get_metrics() -> ~gi.repository.Pango.FontMetrics Get overall metric information for the fonts in the fontset. Virtual Methods --------------- .. rst-class:: interim-class .. class:: Fontset :no-index: .. method:: do_foreach(func: ~typing.Callable[[~gi.repository.Pango.Fontset, ~gi.repository.Pango.Font, ~typing.Any], bool], data: ~typing.Any = None) -> None Iterates through all the fonts in a fontset, calling ``func`` for each one. If ``func`` returns :const:`True`, that stops the iteration. .. versionadded:: 1.4 :param func: Callback function :param data: data to pass to the callback function .. method:: do_get_font(wc: int) -> ~gi.repository.Pango.Font Returns the font in the fontset that contains the best glyph for a Unicode character. :param wc: a Unicode character .. method:: do_get_language() -> ~gi.repository.Pango.Language The type of the None singleton. .. method:: do_get_metrics() -> ~gi.repository.Pango.FontMetrics Get overall metric information for the fonts in the fontset. Fields ------ .. rst-class:: interim-class .. class:: Fontset :no-index: .. attribute:: parent_instance