freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] Problems with Glyph rendering


From: Jens-Wolfhard Schicke
Subject: [ft] Problems with Glyph rendering
Date: Fri, 01 Sep 2006 12:18:48 +0200

I receive an error of 10 from FT_Glyph_To_Bitmap within the code below. The fterrdef.h says it has to do with array allocation. It worked with freetype-2.1.7-2.4 (debian package version). What did I do wrong?

Problem occurs with freetype-2.1.7-5 (again debian package)

The error occurs with codepoint 32, while loading some Arial.ttf. Do you need other information?

---- code ----

     glyph_index = FT_Get_Char_Index(Font[i], (FT_ULong)codepoint);
if((error = FT_Load_Glyph(Font[i], glyph_index, FT_LOAD_TARGET_MONO))) { fprintf(stderr, "FreeType LoadGlyph failed for character %ld: %d\n", codepoint, error);
       exit(2);
     }
     if((error = FT_Get_Glyph(Font[i]->glyph, &(Glyph[i][c])))) {
fprintf(stderr, "FreeType GetGlyph failed for character %ld: %d\n", codepoint, error);
       exit(2);
     }
if((error = FT_Glyph_To_Bitmap(&(Glyph[i][c]), FT_RENDER_MODE_MONO, NULL, 1))) { // <---------------- ERROR here fprintf(stderr, "FreeType GlyphToBitmap failed for character %ld: %d\n", codepoint, error);
       exit(2);
     }
if(Glyph[i][c]->format != FT_GLYPH_FORMAT_BITMAP || ((FT_BitmapGlyph)(Glyph[i][c]))->bitmap.pixel_mode != FT_PIXEL_MODE_MONO) { fprintf(stderr, "FreeType did not render the format requested: %d\n", ((FT_BitmapGlyph)(Glyph[i][c]))->bitmap.pixel_mode);
       exit(2);
     }


Mit freundlichem Gruß
Jens Schicke
--
Jens Schicke                  address@hidden
asco GmbH                     http://www.asco.de
Mittelweg 7                   Tel 0531/3906-127
38106 Braunschweig            Fax 0531/3906-400




reply via email to

[Prev in Thread] Current Thread [Next in Thread]