The pitch is positive when the bitmap has a ‘down’ flow,
and negative when it has an ‘up’ flow.
rows * pitch
When i multiply a negative pitch i will get a negative number of bytes
right?? or my assumption is wrong?
I would like to read the bitmap->buffer,
for (i=0; i < size ; i++)
printf("%.2x ",slot->bitmap.buffer[i]);
if size = rows*pitch,
I got the following data for unicode val 0x40 (which represents @)
I got pitch as 4.
Font Data:00 07 fc 00 00 00 00 3f ff 80 00 00 00 ff ff e0 00 00 03 f0 01 f0
00 0
0 07 c0 00 78 00 00 0f 00 00 3c 00 00 0e 00 00 1e 00 00 1c 07 c3 8e 00 00 3c
0f
f3 87 00 00 38 3f ff 87 00 00 70 3c 1f 03 00 00
so, 4 bytes represents one row. I got bit map *width as 22* ,does it mean
the glyph data is actually in *3 bytes(22/8) * and the otherbyte is for
padding?
Thanks,
Sam
On Thu, Feb 25, 2010 at 12:07 PM, Werner LEMBERG <[email protected]> wrote:
>
> > size = ((bitmap->width + 7) / 8) * bitmap->rows;
> >
> > // ((bitmap->width + 7) / 8) is the number of bytes for bitmap->width
> bits
>
> This is not necessarily correct. Especially on Windows, the pitch
> might be a multiple of 4. I suggest to always use the `pitch' field.
>
>
> Werner
>
_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype