[Top][All Lists]

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

Re: [Freetype] Rendering Fonts to Bitmap

From: Peter Montgomery
Subject: Re: [Freetype] Rendering Fonts to Bitmap
Date: Sun, 01 Sep 2002 21:02:26 -0700


    I lost your original post, so I can't check the code.  However,
another "fun" part of dealing with Windows bitmaps is that each scanline
needs to be padded to the nearest multiple of 32 bits.  So, if you have
a 256 color bitmap (8 bits per pixel) that is 3 pixel wide, each
scanline needs to be stored in scanline that is 4 pixels wide.  Are you
meeting this criteria?


----- Original Message -----
From: "Dexter" <address@hidden>
To: <address@hidden>
Sent: Sunday, September 01, 2002 3:21 PM
Subject: Re: [Freetype] Rendering Fonts to Bitmap

> > You can't set a monochrome bitmap to any color.  Set your biBitCount
> > member to something appropriate like 24 if you want a real color
> > Of course, you'll still have problems.  You can expect "SetDIBits"
> > work if the HBITMAP  points to a color bitmap, but you are giving it
> > monochrome glyph bitmap as the image to copy over.  Sorry, it's up
> > you to make sure that you create a color glyph bitmap for your color
> > HBITMAP, or to make them both 8 but grayscale, or both monochrome.
> >
> >     Thanks,
> >     PeterM
> The thing is that it didnt worked even when setting them both mono
> (using ft_render_mode_mono) or setting them both to 8!
> That's why i dont know what could it be :(
> Dexter

reply via email to

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