freetype
[Top][All Lists]
Advanced

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

[ft] for char size above 34,bitmap buffer is not correct!


From: samaram s
Subject: [ft] for char size above 34,bitmap buffer is not correct!
Date: Mon, 22 Feb 2010 15:27:24 -0500


Hi,

If i set my character size as 32 and load glyph like below,

 error = FT_Set_Char_Size( face,32*64,0,72,0 );
error = FT_Load_Char( face, 0x61, FT_LOAD_RENDER|FT_LOAD_MONOCHROME);

I can able to get the correct bitmap glyph-data.
Glyph Data:0f ffffffe0 3f fffffff8 7c 78 70 1c 60 1c 00 1c 00 3c 07 fffffffc 3f  fffffffc 7c 1c fffffff0 1c ffffffe0 1c ffffffe0 3c ffffffe0 3c fffffff8 fffffffc 7f ffffffdc 1f 0e fffffffd fffffffd 00

The buffer, i can map to char "a".

Where in, If i set chat size as 34,

 error = FT_Set_Char_Size( face,34*64,0,72,0 );
error = FT_Load_Char( face, 0x61, FT_LOAD_RENDER|FT_LOAD_MONOCHROME);
Y_max in this case is 17(bitmap->top)+17(bitmap->rows)
Glyph Data:07 fffffff0 00 00 1f fffffffc 00 00 3e fffffffc 00 00 70 1e 00 00 70 0e 00 00 20 0e 00 00 00 0e 00 00 00 fffffffe 00 00 1f fffffffe 00 00 3f ffffffce  00

Why am i getting the 3rd and 4th byte always zero?

This is the way i am getting the bitmap->buffer data

y_max = slot->bitmap_top + bitmap->rows;

Y_max i am getting as 18+18;
 fwrite( bitmap->buffer,sizeof(char),y_max, fp);

How can i get the correct bitmap->buffer for any character size given?Why is it happening so?Anybody can you please explain.

Thanks a lot

Regards,
Sam


reply via email to

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