#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma comment( lib, "freetype248.lib" )
#include <ft2build.h>
#include FT_FREETYPE_H
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow )
{
FT_Library library;
int error = FT_Init_FreeType( &library );
if ( error )
MessageBox( 0, "Error with library", "Error", 0 );
FT_Face face;
error = FT_New_Face( library, "test.ttf", 0, &face ); // THE ERROR IS HERE!!
if ( error == FT_Err_Unknown_File_Format )
MessageBox( 0, "Unknown format", "Error", 0 );
else if ( error )
MessageBox( 0, "Error with face", "Error", 0 );
return 0;
};
test.tff is a valid TFF file (I've tried different files). The call stack is a bit like this (if it helps):
_FT_New_Face()
_FT_Open_Face()
_FT_Stream_New()
_FT_Stream_Open()
fseek()
Any help is much appreciated. Or if you can point me to a resource that shows how to install it correctly, that would also be great.
Thanks.