PangoFc.Decoder¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class PangoFc.Decoder(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
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 [method`PangoFc`.FontMap.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.
New in version 1.6.
- get_charset(fcfont)¶
- Parameters:
fcfont (
PangoFc.Font
) – thePangoFcFont
to query.- Returns:
the
FcCharset
for fcfont; must not be modified or freed.- Return type:
Generates an
FcCharSet
of supported characters for the fcfont given.The returned
FcCharSet
will be a reference to an internal value stored by thePangoFcDecoder
and must not be modified or freed.New in version 1.6.
- get_glyph(fcfont, wc)¶
- Parameters:
fcfont (
PangoFc.Font
) – aPangoFcFont
to query.wc (
int
) – the Unicode code point to convert to a singlePangoGlyph
.
- Returns:
the glyph index, or 0 if the glyph isn’t covered by the font.
- Return type:
Generates a
PangoGlyph
for 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.)
New in version 1.6.
- do_get_charset(fcfont) virtual¶
- Parameters:
fcfont (
PangoFc.Font
) – thePangoFcFont
to query.- Returns:
the
FcCharset
for fcfont; must not be modified or freed.- Return type:
Generates an
FcCharSet
of supported characters for the fcfont given.The returned
FcCharSet
will be a reference to an internal value stored by thePangoFcDecoder
and must not be modified or freed.New in version 1.6.
- do_get_glyph(fcfont, wc) virtual¶
- Parameters:
fcfont (
PangoFc.Font
) – aPangoFcFont
to query.wc (
int
) – the Unicode code point to convert to a singlePangoGlyph
.
- Returns:
the glyph index, or 0 if the glyph isn’t covered by the font.
- Return type:
Generates a
PangoGlyph
for 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.)
New in version 1.6.