FT_Library library;
FT_Error error = FT_Init_FreeType( &library );
if ( error )
{
;
}
FT_Face face;
error = FT_New_Face( library, "C:\\Windows\\Fonts\\simsun.ttc", 0, &face );
if ( error == FT_Err_Unknown_File_Format)
{
;
}
//遍历字符集
int iCharMapCnt = face->num_charmaps;
FT_CharMap* pCharMaps = face->charmaps;
for ( int i = 0; i < iCharMapCnt; i ++)
{
FT_CharMapRec aCharMap = *(pCharMaps[i]);
FT_Encoding enconding = aCharMap.encoding;
int platform_id = aCharMap.platform_id;
int encoding_id = aCharMap.encoding_id;
}
//字体全局的东西、用字体单元来度量的。
int iGlyphsCnt = face->num_glyph
FT_Error error = FT_Init_FreeType( &library );
if ( error )
{
;
}
FT_Face face;
error = FT_New_Face( library, "C:\\Windows\\Fonts\\simsun.ttc", 0, &face );
if ( error == FT_Err_Unknown_File_Format)
{
;
}
//遍历字符集
int iCharMapCnt = face->num_charmaps;
FT_CharMap* pCharMaps = face->charmaps;
for ( int i = 0; i < iCharMapCnt; i ++)
{
FT_CharMapRec aCharMap = *(pCharMaps[i]);
FT_Encoding enconding = aCharMap.encoding;
int platform_id = aCharMap.platform_id;
int encoding_id = aCharMap.encoding_id;
}
//字体全局的东西、用字体单元来度量的。
int iGlyphsCnt = face->num_glyph