get_text_shaper method

get_text_shaper(font_path, face_index)

Returns new instance of a text shaper for the font specified by fontPath andfaceIndex.

def get_text_shaper(self, font_path: str, face_index: int):
    ...
ParameterTypeDescription
font_pathstrAn absolute path to the font file.
face_indexintAn index of the font face in the TrueType font collection, or 0 if specified font file is not TrueType font collection.

get_text_shaper(font_id, font_blob, face_index)

Returns new instance of a text shaper for the font represented by fontBlob andfaceIndex.

def get_text_shaper(self, font_id: str, font_blob: bytes, face_index: int):
    ...
ParameterTypeDescription
font_idstrA unique identifier that can be uniquely associated with the provided font fontBlob.
font_blobbytesByte array with the font data.
face_indexintAn index of the font face in the TrueType font collection, or 0 if fontBlob is not TrueType font collection.

See Also