freetypy.Face.get_char_index_unicode

Face.get_char_index_unicode()

⨎ Return the glyph index of a given Unicode character.

Unlike get_char_index, if the selected CharMap is not Unicode, the given unicode character will first be encoded to the correct character map, if possible.

⨎ This is a freetypy-specific function.

Parameters:

charcode : length-1 unicode string

The Unicode character.

Returns:

glyph_index : int

The glyph index. 0 means ‘undefined character code’.