freetypy.Face.select_charmap¶
-
Face.
select_charmap
()¶ Select a given charmap by its encoding tag.
Parameters: encoding (int) – An encoding constant. See ENCODING
.Notes
This function raises an exception if no charmap in the face corresponds to the encoding queried here.
Because many fonts contain more than a single cmap for Unicode encoding, this function has some special code to select the one which covers Unicode best (‘best’ in the sense that a UCS-4 cmap is preferred to a UCS-2 cmap). It is thus preferable to use
set_charmap
in this case.