/* ft2test1.c */ #include "stdafx.h" #include int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { FT_Library library; FT_Face face; int glyphIndex; int result; result = FT_Init_FreeType( &library ); result = FT_New_Face( library, "arial.ttf", 0, &face ); result = FT_Set_Char_Size( face, 0, 16*64, 96, 96 ); glyphIndex = FT_Get_Char_Index( face, (int)'A' ); /* memory error occurs in FT_DoneFreeType() if FT_Load_Glyph() is called */ result = FT_Load_Glyph(face, glyphIndex, FT_LOAD_DEFAULT ); result = FT_Done_Face( face ); result = FT_Done_FreeType( library ); return 0; }