|
From: | Mendrak |
Subject: | [Freetype] Keep getting error after |
Date: | Tue, 30 Jul 2002 08:53:12 -0700 |
I've specified the Arial.ttf font as a test font (this is on a Windows
98 machine) and it seemed to load
the font, but upon trying to load the character I get that error for
every character. I'm sure I'm doing
something simple wrong, but I'm currently stuck. Any ideas?
....
int err = FT_Init_FreeType( &library );
if ( err )
{
printf("Couldn't initialize FT library\n");
exit(1);
}
err = FT_New_Face(library, argv[1], 0, &face);
if ( err == FT_Err_Unknown_File_Format )
{
printf("Couldn't understand the format\n");
exit(1);
}
else if (err)
{
printf("Unexpected error reading font\n");
exit(1);
}
for (int i=64; i<72; i++)
{
int glyph_index = FT_Get_Char_Index(face, i);
err = FT_Load_Char(face, glyph_index, FT_LOAD_RENDER);
if (err)
{
printf("Unexpected error creating glyph: %d\n", err);
exit(1);
}
...
[Prev in Thread] | Current Thread | [Next in Thread] |