freetype
[Top][All Lists]
Advanced

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

Re: [ft] monochrome bitmaps


From: T. Horsnell
Subject: Re: [ft] monochrome bitmaps
Date: Thu, 08 Jan 2009 10:58:24 +0000
User-agent: Thunderbird 2.0.0.18 (X11/20081119)

Wenlin Institute wrote:

On Jan 7, 2009, at 3:32 AM, T. Horsnell wrote:

...
I looked at the documentation for FT_Pixel_Mode enumeration
as you suggested, but dont understand this output. The 'l'
character in this sanserif font should have 40 bits set (20*2),
so what are all the zeros? Are the bits organised in rows
such that each row of bits starts in a new byte?

Yes.

And is there a pad byte at the end of each row?

See the documentation for FT_Bitmap, especially:

/* pitch :: The pitch's absolute value is the number of bytes */ /* taken by one bitmap row, including padding. */ /* However, the pitch is positive when the bitmap has */ /* a `down' flow, and negative when it has an `up' */ /* flow. In all cases, the pitch is an offset to add */ /* to a bitmap pointer in order to go down one row. */

Your sample code doesn't show the value of pitch, but it's probably 2, since every other byte is zero.

Best wishes,

Tom Bishop


Ahhhh. Thank you!
Terry




reply via email to

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