我已将“arial.ttf”文件(取自我的 /Windows/Fonts 文件夹)加载到内存中,但是将其传递给 FT_New_Memory_Face 时会崩溃(在 FT_Open_Face 中的某处)。我无法调试这个,任何关于我可能做错了什么的线索?
unsigned char *fontBuffer = LoadFile("arial.ttf");
zip_uint64_t fSize = GetFileSize("arial.ttf");
FT_Library library; /* handle to library */
FT_Face face;
int error = FT_Init_FreeType( &library );
if( error != 0 )
printf("FT_Init_FreeType failed");
error = FT_New_Memory_Face( library,
(FT_Byte*)fontBuffer,
fSize,
0,
&face );
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2309 次 |
| 最近记录: |