3 #include <freetype/freetype.h>
14 * We assume that `FREETYPE_TESTS_DATA_DIR` was set by `meson test`.
15 * Otherwise we default to `../tests/data`.
17 * TODO (David): Rewrite this to pass the test directory through the
20 const char* testdata_dir = getenv( "FREETYPE_TESTS_DATA_DIR" );
21 char filepath[FILENAME_MAX];
24 snprintf( filepath, sizeof( filepath ), "%s/%s",
25 testdata_dir ? testdata_dir : "../tests/data",
26 "As.I.Lay.Dying.ttf" );
28 FT_Init_FreeType( &library );
29 if ( FT_New_Face( library, filepath, 0, &face ) != 0 )
31 fprintf( stderr, "Could not open file: %s\n", filepath );
35 for ( FT_ULong i = 59; i < 171; i++ )
37 FT_UInt gid = FT_Get_Char_Index( face, i );
38 FT_Error code = FT_Load_Glyph( face, gid, FT_LOAD_DEFAULT );
42 printf( "unknown %d for char %lu, gid %u\n", code, i, gid );