Skip to content

Pango.Fontset

class — extends GObject.Object

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

foreach

def foreach(self, func: FontsetForeachFunc) -> None

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

If func returns True, that stops the iteration.

Parameters:

  • func — Callback function

get_font

def get_font(self, 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

def get_metrics(self) -> FontMetrics

Get overall metric information for the fonts in the fontset.

Virtual methods

do_foreach

def do_foreach(self, func: FontsetForeachFunc) -> None

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

If func returns True, that stops the iteration.

Parameters:

  • func — Callback function

do_get_font

def do_get_font(self, 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

def do_get_language(self) -> Language

a function to get the language of the fontset.

do_get_metrics

def do_get_metrics(self) -> FontMetrics

Get overall metric information for the fonts in the fontset.