我正在为Windows和FreeType2而苦苦挣扎。我正在学习本教程,示例代码如下所示:
FT_Library library; /* handle to library */
FT_Face face; /* handle to face object */
error = FT_Init_FreeType( &library );
if ( error ) { ... }
error = FT_New_Face(library, "/usr/share/fonts/truetype/arial.ttf", 0, &face ); // <-- this does not exist...
if ( error == FT_Err_Unknown_File_Format )
{
... the font file could be opened and read, but it appears
... that its font format is unsupported
}
else if ( error )
{
... another error code means that the font file could not
... be opened or read, or simply that it is broken...
}这个/usr/share/fonts/truetype/arial.ttf根本不存在,我怎么才能让Arial字体使用它呢?
发布于 2014-10-06 21:58:12
它随系统的不同而不同。检查FOLDERID_Fonts。
https://stackoverflow.com/questions/26215422
复制相似问题