[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] FT_Outline_Get_Bitmap
From: |
George Williams |
Subject: |
[ft-devel] FT_Outline_Get_Bitmap |
Date: |
16 Nov 2005 14:08:39 -0800 |
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.
- [ft-devel] FT_Outline_Get_Bitmap,
George Williams <=