Fontset

class Fontset(**properties: Any)

Superclasses: Object

Subclasses: FontsetSimple

A PangoFontset represents a set of PangoFont to use when rendering text.

A PangoFontset is the result of resolving a PangoFontDescription against a particular PangoContext. It has operations for finding the component font for a particular Unicode character, and for finding a composite set of metrics for the entire fontset.

Methods

class Fontset
foreach(func: Callable[[...], bool], *data: Any) None

Iterates through all the fonts in a fontset, calling func for each one.

If func returns True, that stops the iteration.

Added in version 1.4.

Parameters:
  • func – Callback function

  • data – data to pass to the callback function

get_font(wc: int) Font

Returns the font in the fontset that contains the best glyph for a Unicode character.

Parameters:

wc – a Unicode character

get_metrics() FontMetrics

Get overall metric information for the fonts in the fontset.

Virtual Methods

class Fontset
do_foreach(func: Callable[[...], bool], *data: Any) None

Iterates through all the fonts in a fontset, calling func for each one.

If func returns True, that stops the iteration.

Added in version 1.4.

Parameters:
  • func – Callback function

  • data – data to pass to the callback function

do_get_font(wc: int) Font

Returns the font in the fontset that contains the best glyph for a Unicode character.

Parameters:

wc – a Unicode character

do_get_language() Language
do_get_metrics() FontMetrics

Get overall metric information for the fonts in the fontset.

Fields

class Fontset
parent_instance