basickarl
basickarl

Reputation: 40522

FreeType font path Windows

I am struggling with Windows and 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.

Upvotes: 1

Views: 2673

Answers (1)

MSalters
MSalters

Reputation: 179981

It varies from system to system. Check FOLDERID_Fonts.

Upvotes: 2

Related Questions