freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] monochrome rendering, help.


From: David Turner
Subject: Re: [Freetype] monochrome rendering, help.
Date: Thu, 17 May 2001 13:13:07 +0200

Hello again,

Giuliano Pochini a écrit :
> 
> Hi!
> 
> I'm using FT 2.0.1 and I can't get monochrome rendering. I have
> no problems with AA'd text. When I pass ft_render_mode_mono to
> FT_Glyph_To_Bitmap() I get a scrambled bitmap. I can't find the
> format of a mono bitmap in the docs so I suppose it's structured
> this way:
> 
> byte0   byte1   byte2 ... half-used-byten-1
> byten   byten+1 etc.
> 
> Each bit is a pixel. bitmap->pitch is the # of bytes in a row
> and the remaining bits on the right are wasted.
> Is this right ?  Because it doesn't work...
>
That's it, but you must be careful that the least significant
bit of each byte corresponds to the rightmost pixel.

I.e:

  0x80  is the left-most pixel
  0x01  is the right-most one

finally, some graphics libraries insist that you pass them
bitmaps whose rows are padded to 16 or 32 bits, otherwise
they'll display crap even if the bitmap buffer is correct..

Regards,

- David



reply via email to

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