[cairo] font antialiasing options
Fried, Vojtech
vojtech.fried at streamserve.com
Mon Dec 13 06:43:07 PST 2010
Hi,
Here is what I found about antialiasing options in cairo 1.10. I am not
sure if it is a feature, bug or I am doing something wrong.
When I use set_antialias(cairo.ANTIALIAS_SUBPIXEL) (using pycairo) font
option for image surface, it does not do what I would expect. When there
is e.g. a black text on white background, there should be colored
(sub)pixels visible but what I see is only gray pixels. Is it subpixel
antialiasing converted to grayscale or "gray" antialiasing? (Or
something else?) As far as I know, freetype does not by default support
subpixel antialiasing, so it is ok, but it is strange for win32 fonts.
On the other hand when I use win32 fonts and win32 surface, subpixel
antialiasing works.
When I use ANTIALIAS_GRAY option, it works as expected for freetype
fonts but it is not very good for win32 fonts. For font sizes cca 13+-4
(with Arial font), there are no gray pixels, no antialiasing takes
place. Is it so because font hinting is turned on? But I can't see a way
how to turn it off. I can set_hint_style( cairo.HINT_STYLE_NONE ) but it
has no effect, set_hint_metrics( cairo.HINT_METRICS_OFF ) does have
effect but not on antialiasing. From what I have read about this I am
not sure if it is possible to turn hinting off when using ExtTextOut
function as cairo does. It should be possible for GetGlyphOutline by
setting option GGO_UNHINTED. Or is it a GDI feature unrelated to
hinting? Anyway it works in the same way both in image surface and win32
surface.
/Vojtech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20101213/15b6880d/attachment.html>
More information about the cairo
mailing list