Pango.FontFamily¶
class — extends GObject.Object, Gio.ListModel
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.
Methods¶
get_face¶
Gets the PangoFontFace of family with the given name.
Parameters:
name— the name of a face. If the name isNone, the family's default face (fontconfig calls it "Regular") will be returned.
get_name¶
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¶
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
FontMetrics.get_approximate_digit_width, since the
results of FontMetrics.get_approximate_char_width may
be affected by double-width characters.
is_variable¶
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
FontDescription.set_variations for more information.
list_faces¶
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 Gio.ListModel interface
for enumerating faces.
Virtual methods¶
do_get_face¶
Gets the PangoFontFace of family with the given name.
Parameters:
name— the name of a face. If the name isNone, the family's default face (fontconfig calls it "Regular") will be returned.
do_get_name¶
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¶
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
FontMetrics.get_approximate_digit_width, since the
results of FontMetrics.get_approximate_char_width may
be affected by double-width characters.
do_is_variable¶
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
FontDescription.set_variations for more information.
do_list_faces¶
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 Gio.ListModel interface
for enumerating faces.
Properties¶
is_monospace¶
Is this a monospace font
is_variable¶
Is this a variable font
item_type¶
The type of items contained in this list.
n_items¶
The number of items contained in this list.
name¶
The name of the family