freetypy.Face.get_char_variant_index¶
-
Face.
get_char_variant_index
()¶ Get the glyph id of a char code as modified by the variant selector.
Parameters: Returns: glyph_index – The glyph index. 0 means either ‘undefined char code’, or ‘undefined selector code’, or ‘no variation selector cmap subtable’, or ‘current CharMap is not Unicode’.
Return type: Notes
If you use FreeType to manipulate the contents of font files directly, be aware that the glyph index returned by this function doesn’t always correspond to the internal indices used within the file. This is done to ensure that value 0 always corresponds to the ‘missing glyph’.
This function is only meaningful if a) the font has a variation selector cmap sub table, and b) the current charmap has a Unicode encoding.