:right-sidebar: True FontFace =================================================================== .. currentmodule:: gi.repository.Pango .. class:: FontFace(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` A ``PangoFontFace`` is used to represent a group of fonts with the same family, slant, weight, and width, but varying sizes. Methods ------- .. rst-class:: interim-class .. class:: FontFace :no-index: .. method:: describe() -> ~gi.repository.Pango.FontDescription Returns a font description that matches the face. The resulting font description will have the family, style, variant, weight and stretch of the face, but its size field will be unset. .. method:: do_describe(self) -> ~gi.repository.Pango.FontDescription .. method:: do_get_face_name(self) -> str .. method:: do_get_family(self) -> ~gi.repository.Pango.FontFamily .. method:: do_is_synthesized(self) -> bool .. method:: do_list_sizes(self) -> list[int] | None .. method:: get_face_name() -> str Gets a name representing the style of this face. Note that a font family may contain multiple faces with the same name (e.g. a variable and a non-variable face for the same style). .. method:: get_family() -> ~gi.repository.Pango.FontFamily Gets the ``PangoFontFamily`` that ``face`` belongs to. .. versionadded:: 1.46 .. method:: is_synthesized() -> bool Returns whether a ``PangoFontFace`` is synthesized. This will be the case if the underlying font rendering engine creates this face from another face, by shearing, emboldening, lightening or modifying it in some other way. .. versionadded:: 1.18 .. method:: list_sizes() -> list[int] | None List the available sizes for a font. This is only applicable to bitmap fonts. For scalable fonts, stores :const:`None` at the location pointed to by ``sizes`` and 0 at the location pointed to by ``n_sizes``\. The sizes returned are in Pango units and are sorted in ascending order. .. versionadded:: 1.4 Virtual Methods --------------- .. rst-class:: interim-class .. class:: FontFace :no-index: .. method:: do_describe() -> ~gi.repository.Pango.FontDescription Returns a font description that matches the face. The resulting font description will have the family, style, variant, weight and stretch of the face, but its size field will be unset. .. method:: do_get_face_name() -> str Gets a name representing the style of this face. Note that a font family may contain multiple faces with the same name (e.g. a variable and a non-variable face for the same style). .. method:: do_get_family() -> ~gi.repository.Pango.FontFamily Gets the ``PangoFontFamily`` that ``face`` belongs to. .. versionadded:: 1.46 .. method:: do_is_synthesized() -> bool Returns whether a ``PangoFontFace`` is synthesized. This will be the case if the underlying font rendering engine creates this face from another face, by shearing, emboldening, lightening or modifying it in some other way. .. versionadded:: 1.18 .. method:: do_list_sizes() -> list[int] | None List the available sizes for a font. This is only applicable to bitmap fonts. For scalable fonts, stores :const:`None` at the location pointed to by ``sizes`` and 0 at the location pointed to by ``n_sizes``\. The sizes returned are in Pango units and are sorted in ascending order. .. versionadded:: 1.4 Fields ------ .. rst-class:: interim-class .. class:: FontFace :no-index: .. attribute:: parent_instance