pango.FontFamily

pango.FontFamily — an object representing a family of related font faces.

Synopsis

class pango.FontFamily(gobject.GObject):
    def list_faces()
def get_name()
def is_monospace()

Ancestry

+-- gobject.GObject
  +-- pango.FontFamily

Description

The pango.FontFamily object is used to represent a family of related font faces. The faces in a family share a common design, but differ in slant, weight, width and other aspects. A list of pango.FontFamily objects can be retrieved from a pango.Context object using the pango.Context.list_families() method and from a pango.FontMap object using the pango.FontMap.list_families() method.

Methods

pango.FontFamily.list_faces

    def list_faces()

Returns :

a list of pango.FontFace objects.

The list_faces() method returns a list of the different pango.FontFace object that make up the font family>. The faces in a family share a common design, but differ in slant, weight, width and other aspects.

pango.FontFamily.get_name

    def get_name()

Returns :

the name of the family.

The get_name() method returns a string containing the name of the font family. The name is unique among all fonts for the font backend and can be used in a pango.FontDescription to specify that a face from this family is desired.

pango.FontFamily.is_monospace

    def is_monospace()

Returns :

True if the font family is monospace.

The is_monospace() method returns True if the font family describes a monospace font. 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. The best way to find out the grid-cell size is to call the get_approximate_digit_width() method, since the results of the get_approximate_char_width()