ftFontCreateReferenced

Creates an #hb_font_t font object from the specified FT_Face.

<note>Note: You must set the face size on ft_face before calling harfbuzz.global.ftFontCreateReferenced on it. HarfBuzz assumes size is always set and will access size member of FT_Face unconditionally.</note>

This is the preferred variant of the hb_ft_font_create* function family, because it calls FT_Reference_Face() on ft_face, ensuring that ft_face remains alive as long as the resulting #hb_font_t font object remains alive.

Use this version unless you know you have good reasons not to.

Parameters

ftFace freetype2.types.Face

FT_Face to work upon

Return Value

Type: harfbuzz.font.Font

the new #hb_font_t font object