#include #include #include #include FT_FREETYPE_H int main(void){ FT_Library ft; if(FT_Init_FreeType(&ft)){ printf("Error"); return 1; } FT_Face face; if(FT_New_Face(ft, "joypixels-android.ttf", 0, &face)) { printf("Error"); return 1; } FT_Error err = FT_Set_Char_Size(face, 0, 16*64, 300, 300); printf("%d\n", err); FT_ULong charcode; FT_UInt gindex; charcode = FT_Get_First_Char(face, &gindex); while(gindex != 0){ printf("(%lu, %u)\n", charcode, gindex); FT_Error err = FT_Load_Glyph(face, gindex, FT_LOAD_DEFAULT|FT_LOAD_COLOR); printf("%d\n", err); FT_GlyphSlot g = face->glyph; err = FT_Render_Glyph(g, FT_RENDER_MODE_NORMAL); /* Do everything with the glyph here */ charcode = FT_Get_Next_Char(face, charcode, &gindex); } return 0; }