Pango.FontFamily¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
|||
r |
|||
r |
|||
r |
|||
r |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Pango.FontFamily(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
A
PangoFontFamily
is used to represent a family of related font faces.The font faces in a family share a common design, but differ in slant, weight, width or other aspects.
- get_face(name)[source]¶
- Parameters:
name (
str
orNone
) – the name of a face. If the name isNone
, the family’s default face (fontconfig calls it “Regular”) will be returned.- Returns:
the
PangoFontFace
, orNone
if no face with the given name exists.- Return type:
Gets the
PangoFontFace
of self with the given name.New in version 1.46.
- get_name()[source]¶
- Returns:
the name of the family. This string is owned by the family object and must not be modified or freed.
- Return type:
Gets the name of the family.
The name is unique among all fonts for the font backend and can be used in a
PangoFontDescription
to specify that a face from this family is desired.
- is_monospace()[source]¶
-
A monospace font is a font designed for text display where the the characters form a regular grid.
For Western languages this would mean that the advance width of all characters are the same, but this categorization also includes Asian fonts which include double-width characters: characters that occupy two grid cells.
GLib.unichar_iswide
() returns a result that indicates whether a character is typically double-width in a monospace font.The best way to find out the grid-cell size is to call [method`Pango`.FontMetrics.get_approximate_digit_width], since the results of [method`Pango`.FontMetrics.get_approximate_char_width] may be affected by double-width characters.
New in version 1.4.
- is_variable()[source]¶
-
A variable font is a font which has axes that can be modified to produce different faces.
Such axes are also known as _variations_; see [method`Pango`.FontDescription.set_variations] for more information.
New in version 1.44.
- list_faces()[source]¶
- Returns:
location to store an array of pointers to
PangoFontFace
objects, orNone
. This array should be freed withGLib.free
() when it is no longer needed.- Return type:
faces: [
Pango.FontFace
]
Lists the different font faces that make up self.
The faces in a family share a common design, but differ in slant, weight, width and other aspects.
Note that the returned faces are not in any particular order, and multiple faces may have the same name or characteristics.
PangoFontFamily
also implemented the [iface`Gio`.ListModel] interface for enumerating faces.
- do_get_face(name) virtual¶
- Parameters:
name (
str
orNone
) – the name of a face. If the name isNone
, the family’s default face (fontconfig calls it “Regular”) will be returned.- Returns:
the
PangoFontFace
, orNone
if no face with the given name exists.- Return type:
Gets the
PangoFontFace
of family with the given name.New in version 1.46.
- do_get_name() virtual¶
- Returns:
the name of the family. This string is owned by the family object and must not be modified or freed.
- Return type:
Gets the name of the family.
The name is unique among all fonts for the font backend and can be used in a
PangoFontDescription
to specify that a face from this family is desired.
- do_is_monospace() virtual¶
-
A monospace font is a font designed for text display where the the characters form a regular grid.
For Western languages this would mean that the advance width of all characters are the same, but this categorization also includes Asian fonts which include double-width characters: characters that occupy two grid cells.
GLib.unichar_iswide
() returns a result that indicates whether a character is typically double-width in a monospace font.The best way to find out the grid-cell size is to call [method`Pango`.FontMetrics.get_approximate_digit_width], since the results of [method`Pango`.FontMetrics.get_approximate_char_width] may be affected by double-width characters.
New in version 1.4.
- do_is_variable() virtual¶
-
A variable font is a font which has axes that can be modified to produce different faces.
Such axes are also known as _variations_; see [method`Pango`.FontDescription.set_variations] for more information.
New in version 1.44.
- do_list_faces() virtual¶
- Returns:
location to store an array of pointers to
PangoFontFace
objects, orNone
. This array should be freed withGLib.free
() when it is no longer needed.- Return type:
faces: [
Pango.FontFace
]
Lists the different font faces that make up family.
The faces in a family share a common design, but differ in slant, weight, width and other aspects.
Note that the returned faces are not in any particular order, and multiple faces may have the same name or characteristics.
PangoFontFamily
also implemented the [iface`Gio`.ListModel] interface for enumerating faces.
Property Details¶
- Pango.FontFamily.props.is_monospace¶
-
Is this a monospace font
New in version 1.52.
- Pango.FontFamily.props.is_variable¶
-
Is this a variable font
New in version 1.52.
- Pango.FontFamily.props.item_type¶
- Name:
item-type
- Type:
- Default Value:
<GType GObject>
- Flags:
The type of items contained in this list.
- Pango.FontFamily.props.n_items¶
-
The number of items contained in this list.