Class: Pango::FontFamily

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#is_monospaceTrueClass

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. g_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 pango_font_metrics_get_approximate_digit_width(), since the results of pango_font_metrics_get_approximate_char_width() may be affected by double-width characters.

Returns:

  • (TrueClass)

    true if the family is monospace.

#is_variableTrueClass

A variable font is a font which has axes that can be modified to produce different faces.

Returns:

  • (TrueClass)

    true if the family is variable

#list_faces(faces, n_faces) ⇒ nil

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.

Parameters:

  • faces (Array<Pango::FontFace>)

    location to store an array of pointers to Pango::FontFace objects, or nil. This array should be freed with g_free() when it is no longer needed.

  • n_faces (Integer)

    location to store number of elements in faces.

Returns:

  • (nil)

#nameString

Gets the name of the 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.

Returns:

  • (String)

    the name of the family. This string is owned by the family object and must not be modified or freed.