Class: Pango::FontFamily

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

Instance Method Summary collapse

Instance Method Details

#get_face(name) ⇒ Pango::FontFace

Gets the PangoFontFace of family with the given name.

Parameters:

  • name (String)

    the name of a face. If the name is nil, the family's default face (fontconfig calls it "Regular") will be returned.

Returns:

  • (Pango::FontFace)

    the PangoFontFace, or nil if no face with the given name exists.

#is_monospaceBoolean

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 [methodPango.FontMetrics.get_approximate_digit_width], since the results of [methodPango.FontMetrics.get_approximate_char_width] may be affected by double-width characters.

Returns:

  • (Boolean)

    true if the family is monospace.

#is_monospace=(is_monospace) ⇒ Boolean

Is this a monospace font

Parameters:

  • is_monospace (Boolean)

Returns:

  • (Boolean)

    is-monospace

  • (Boolean)

    is-monospace

#is_monospace?Boolean

Is this a monospace font

Returns:

  • (Boolean)

    is-monospace

#is_variableBoolean

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 [methodPango.FontDescription.set_variations] for more information.

Returns:

  • (Boolean)

    true if the family is variable

#is_variable=(is_variable) ⇒ Boolean

Is this a variable font

Parameters:

  • is_variable (Boolean)

Returns:

  • (Boolean)

    is-variable

  • (Boolean)

    is-variable

#is_variable?Boolean

Is this a variable font

Returns:

  • (Boolean)

    is-variable

#item_typeGLib::Type

The type of items contained in this list.

Returns:

  • (GLib::Type)

    item-type

#item_type=(item_type) ⇒ GLib::Type

The type of items contained in this list.

Parameters:

  • item_type (GLib::Type)

Returns:

  • (GLib::Type)

    item-type

  • (GLib::Type)

    item-type

#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.

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 [ifaceGio.ListModel] interface for enumerating faces.

Parameters:

  • faces (Array<Pango::FontFace>)

    location to store an array of pointers to PangoFontFace 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)

#n_itemsInteger

The number of items contained in this list.

Returns:

  • (Integer)

    n-items

#n_items=(n_items) ⇒ Integer

The number of items contained in this list.

Parameters:

  • n_items (Integer)

Returns:

  • (Integer)

    n-items

  • (Integer)

    n-items

#nameString

The name of the family

Returns:

  • (String)

    name

#name=(name) ⇒ String

The name of the family

Parameters:

  • name (String)

Returns:

  • (String)

    name

  • (String)

    name