Comment 73 for bug 145604

Revision history for this message
In , Sylvain Pasche (sylvain-pasche) wrote :

I've pushed an updated version on http://spasche.net/git/cairo.git (thanks James for the updated patch, that helped me for merging).

I've added a new patch with tests (text-lcd-filter-*). I had to update the text-antialias-subpixel reference image now that the subpixel antialiasing uses FreeType. (I didn't update/add quartz reference image, should I do that?).

I had a quick look for the Windows / OS X story, I didn't find APIs for controlling the LCD filter but it is possible I missed something.

On Windows, the LCD filtering is handled by ClearType. The ClearType settings are stored in the registry (HKCU/Control Panel/Desktop/FontSmoothing* entries). The LOGFONT structure which defines the attributes of a font has a lfQuality member to select if ClearType should be used for the font. So it doesn't look like to be possible to change the LCD filtering algorithm through the font API.

For OS X, outside of the CGContextSetAllowsAntialiasing/CGContextSetShouldAntialias methods, I didn't find something that looks like to control the type of LCD filter.