FontFace#
Superclasses: Object
A PangoFontFace
is used to represent a group of fonts with
the same family, slant, weight, and width, but varying sizes.
Methods#
- class FontFace
- describe() 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.
- do_describe(self) FontDescription #
- do_get_family(self) FontFamily #
- 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).
- get_family() FontFamily #
Gets the
PangoFontFamily
thatface
belongs to.Added in version 1.46.
- 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.
Added in version 1.18.
- list_sizes() list[int] | None #
List the available sizes for a font.
This is only applicable to bitmap fonts. For scalable fonts, stores
None
at the location pointed to bysizes
and 0 at the location pointed to byn_sizes
. The sizes returned are in Pango units and are sorted in ascending order.Added in version 1.4.
Virtual Methods#
- class FontFace
- do_describe(type, self) 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.
- Parameters:
type
self
- do_get_face_name(type, self) 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).
- Parameters:
type
self
- do_get_family(type, self) FontFamily #
Gets the
PangoFontFamily
thatface
belongs to.Added in version 1.46.
- Parameters:
type
self
- do_is_synthesized(type, self) 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.
Added in version 1.18.
- Parameters:
type
self
- do_list_sizes(type, self) list[int] | None #
List the available sizes for a font.
This is only applicable to bitmap fonts. For scalable fonts, stores
None
at the location pointed to bysizes
and 0 at the location pointed to byn_sizes
. The sizes returned are in Pango units and are sorted in ascending order.Added in version 1.4.
- Parameters:
type
self
Fields#
- class FontFace
- parent_instance#