The FreeType library defines quite a few basic data types, but I’m not quite sure how to use them. I’m trying to use the FT_Get_Glyph_Name method, which takes this form:
FT_Get_Glyph_Name(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max );
So I have this code:
FT_Face = face;
FT_Pointer = name;
FT_Get_Glyph_Name(face, 0, name, 45);
This works fine, but I’m not sure how to actually get a string representation of the name (to use with printf for example). How do I get from FT_Pointer to a string?
From the documentation link :
FT_Pointeris a typedef on void*.A simple cast is sufficient :
You can also use FT_Pointer type variables and cast them to (char *).