简体   繁体   English

FreeType字体路径Windows

[英]FreeType font path Windows

I am struggling with Windows and FreeType2. 我正在努力使用Windows和FreeType2。 I am following the tutorial and the following is shown as example code: 我正在学习本教程,以下内容作为示例代码显示:

  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...
  }

This /usr/share/fonts/truetype/arial.ttf just simply does not exist, how can I get the Arial font to work with this. 这个/usr/share/fonts/truetype/arial.ttf根本不存在,如何获得Arial字体来使用它。

It varies from system to system. 它因系统而异。 Check FOLDERID_Fonts . 检查FOLDERID_Fonts

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM