ftFaceCreateCached
fn
harfbuzz.face.Face ftFaceCreateCached(freetype2.types.Face ftFace)Creates an #hb_face_t face object from the specified FT_Face.
Note that this is using the FT_Face object just to get at the underlying font data, and fonts created from the returned #hb_face_t will use the native HarfBuzz font implementation, unless you call [harfbuzz.global.ftFontSetFuncs] on them.
This variant of the function caches the newly created #hb_face_t face object, using the generic pointer of ft_face. Subsequent function calls that are passed the same ft_face parameter will have the same #hb_face_t returned to them, and that #hb_face_t will be correctly reference counted.
However, client programs are still responsible for destroying ft_face after the last #hb_face_t face object has been destroyed.
Parameters
ftFace | FT_Face to work upon |
Returns
the new #hb_face_t face object