Hi,
I am trying to get pixel_mode type MONO and the document too says,
We have reduced the size of our code, but it does exactly the same thing:
-
We use the function FT_Load_Char instead of FT_Load_Glyph. As you
probably imagine, it is equivalent to calling FT_Get_Char_Index then
FT_Get_Load_Glyph.
-
We do not use FT_LOAD_DEFAULT for the loading mode, but the bit flag
FT_LOAD_RENDER. It indicates that the glyph image must be immediately
converted to an anti-aliased bitmap. This is of course a shortcut that
avoids calling FT_Render_Glyph explicitly but is strictly equivalent.
Note that you can also *specify that you want a monochrome bitmap instead
by using the addition FT_LOAD_MONOCHROME load flag.*
I tried...as follows...
error = FT_Set_Char_Size( face,8*64,0,100,0 );
slot = face->glyph;
slot->format = FT_GLYPH_FORMAT_BITMAP;
glyph_index = FT_Get_Name_Index( face,"A");
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_RENDER );
error = FT_Render_Glyph( slot,FT_RENDER_MODE_MONO );
printf("Pixel Mode in main %d\n", slot->bitmap.pixel_mode);
Still my pixel_mode is 2.Where in FT_Pixel_Mode for FT_Bitmap says it should
be 1(According to enum value)?What is wrong?
Thanks in advance..
_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype