> 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?

Simply take the absolute value...

> 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 00
>           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

There is something wrong...  The number of bytes must be a multiple of
four if you have a pitch value of 4.

> 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?

Yes, it should be like this if you have 8 pixels per byte.


    Werner
_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to