Fontset#
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
- do_foreach(self, func: Callable[[Fontset, Font, Any], bool], data: Any = None) None #
- Parameters:
func
data
- do_get_metrics(self) FontMetrics #
- foreach(func: Callable[[Fontset, Font, Any], bool], data: Any = None) None #
Iterates through all the fonts in a fontset, calling
func
for each one.If
func
returnsTrue
, 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(type, self, func: Callable[[Fontset, Font, Any], bool], data: Any = None) None #
Iterates through all the fonts in a fontset, calling
func
for each one.If
func
returnsTrue
, that stops the iteration.Added in version 1.4.
- Parameters:
type
self
func – Callback function
data – data to pass to the callback function
- do_get_font(type, self, wc: int) Font #
Returns the font in the fontset that contains the best glyph for a Unicode character.
- Parameters:
type
self
wc – a Unicode character
- do_get_metrics(type, self) FontMetrics #
Get overall metric information for the fonts in the fontset.
- Parameters:
type
self
Fields#
- class Fontset
- parent_instance#