Font

class Font(**properties: Any)

Superclasses: Font, Font, Object

PangoXftFont is an implementation of PangoFcFont using the Xft library for rendering. It is used in conjunction with PangoXftFontMap.

Methods

class Font
get_glyph(wc: str) int

Gets the glyph index for a given Unicode character for font.

If you only want to determine whether the font has the glyph, use has_char().

Use get_glyph() instead.

Added in version 1.2.

Parameters:

wc – Unicode codepoint to look up

get_unknown_glyph(wc: str) int

Returns the index of a glyph suitable for drawing wc as an unknown character.

Use GET_UNKNOWN_GLYPH() instead.

Parameters:

wc – the Unicode character for which a glyph is needed.

has_char(wc: str) bool

Determines whether font has a glyph for the codepoint wc.

Use has_char() instead.

Added in version 1.2.

Parameters:

wc – Unicode codepoint to look up