freetype-devel
[Top][All Lists]
Advanced

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

RE: [ft-devel] FT_Outline_Get_Bitmap


From: Turner, David
Subject: RE: [ft-devel] FT_Outline_Get_Bitmap
Date: Thu, 17 Nov 2005 10:00:16 +0100

As far as I know, all you need is set bitmap->pixel_mode to
FT_PIXEL_MODE_MONO before calling FT_Outline_Get_Bitmap.

the function will then choose the b&w renderer automatically.

- David


> -----Message d'origine-----
> De : address@hidden
> [mailto:address@hidden
> la part de
> George Williams
> Envoyé : mercredi 16 novembre 2005 23:09
> À : address@hidden
> Objet : [ft-devel] FT_Outline_Get_Bitmap
>
>
> Werner & I stumbled on a case where I'd like to get a black & white
> image out of FT_Outline_Get_Bitmap rather than the grey scale output
> that is currently returned.
>
> == Justification ==============================================
> When FF is in debug mode it displays a raster showing what
> pixels would
> be turned on with the current position of the splines. When doing AA
> debugging I can use FT_Outline_Get_Bitmap with the information in the
> execution context and get a grey scale image for the current outline.
> All is happy and nice.
>
> But when doing B&W debugging I ended up writing my own
> (simple) routine
> which turned a pixel on if the center of the pixel was within the
> outline. It didn't do dropout prevention.
>
> In 10pixel B&W debugging of "K" from Vera.ttf this routine gave
> different results from those from freetype. Which made Werner unhappy.
>
> So it might be nice to give consistent results to those from freetype.
> =================================================================
>
> Two thoughts enter my head:
>       Adding a b&w version of FT_OGB to the API
>       Changing the API so that FT_OGB looks at num_grays or
>               pixel_mode field of the bitmap argument.
>       (I think this is a bad idea, I merely suggest it because it was
>        what I tried)
>
> I'm not volunteering to write this myself at the moment. I'm sort of
> hoping someone can tell me that all I need to do is call
> FT_Outline_Get_Foobar.
>
>
>
> _______________________________________________
> Freetype-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freetype-devel
>
***********************************************************************************
Information contained in this email message is confidential and may be 
privileged, and is intended only for use of the individual or entity named 
above. If the reader of this message is not the intended recipient, or the 
employee or agent responsible to deliver it to the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the address@hidden and destroy the original 
message.
***********************************************************************************





reply via email to

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