Decoder#
Added in version 1.6.
Superclasses: Object
PangoFcDecoder is a virtual base class that implementations will
inherit from.
It’s the interface that is used to define a custom encoding for a font.
These objects are created in your code from a function callback that was
originally registered with add_decoder_find_func.
Pango requires information about the supported charset for a font as well
as the individual character to glyph conversions. Pango gets that
information via the get_charset and get_glyph callbacks into your
object implementation.
Methods#
- class Decoder
-
- get_charset(fcfont: Font) CharSet#
Generates an
FcCharSetof supported characters for thefcfontgiven.The returned
FcCharSetwill be a reference to an internal value stored by thePangoFcDecoderand must not be modified or freed.Added in version 1.6.
- Parameters:
fcfont – the
PangoFcFontto query.
- get_glyph(fcfont: Font, wc: int) int#
Generates a
PangoGlyphfor the given Unicode point using the custom decoder.For complex scripts where there can be multiple glyphs for a single character, the decoder will return whatever glyph is most convenient for it. (Usually whatever glyph is directly in the fonts character map table.)
Added in version 1.6.
- Parameters:
fcfont – a
PangoFcFontto query.wc – the Unicode code point to convert to a single
PangoGlyph.
Virtual Methods#
- class Decoder
- do_get_charset(fcfont: Font) CharSet#
Generates an
FcCharSetof supported characters for thefcfontgiven.The returned
FcCharSetwill be a reference to an internal value stored by thePangoFcDecoderand must not be modified or freed.Added in version 1.6.
- Parameters:
fcfont – the
PangoFcFontto query.
- do_get_glyph(fcfont: Font, wc: int) int#
Generates a
PangoGlyphfor the given Unicode point using the custom decoder.For complex scripts where there can be multiple glyphs for a single character, the decoder will return whatever glyph is most convenient for it. (Usually whatever glyph is directly in the fonts character map table.)
Added in version 1.6.
- Parameters:
fcfont – a
PangoFcFontto query.wc – the Unicode code point to convert to a single
PangoGlyph.
Fields#
- class Decoder
- parent_instance#