Rendering the space character in mono mode fails with error code 6
with FreeType 2.2.1 (binary package from Debian testing). This didn't
happen with older FreeType versions and it still works fine with other
characters or with FT_RENDER_MODE_NORMAL. Test program attached.
Christian
#include <ft2build.h>
#include FT_FREETYPE_H
int main() {
FT_Library library;
FT_Face face;
FT_GlyphSlot slot;
FT_Error error;
FT_UInt glyph_index;
error = FT_Init_FreeType(&library);
if (error) {
printf("Error: FT_Init_FreeType(): error code %d\n", error);
exit(1);
}
error = FT_New_Face(library,"Vera.ttf", 0, &face);
if (error) {
printf("Error: FT_New_Face(): error code %d\n", error);
exit(1);
}
error = FT_Set_Pixel_Sizes(face, 0, 16);
if (error) {
printf("Error: FT_Set_Pixel_Sizes(): error code %d\n", error);
exit(1);
}
glyph_index = FT_Get_Char_Index(face, ' ');
printf("glyph_index = %d\n", glyph_index);
error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
if (error) {
printf("Error: FT_Load_Glyph(): error code %d\n", error);
exit(1);
}
error = FT_Render_Glyph(face->glyph, FT_RENDER_MODE_MONO);
if (error) {
printf("Error: FT_Render_Glyph(): error code %d\n", error);
exit(1);
}
return 0;
}
_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype