[cairo] LCD filtering in cairo, use default filter?

Sylvain Pasche sylvain.pasche at gmail.com
Sun Jan 13 07:41:38 PST 2008


Hi,

I've setup a page comparing the various LCD filtering with a set of font 
at different sizes, either with the bytecode interpreter or the 
autohinter (warning, large page):

http://spasche.net/files/lcdfiltering/

One thing to note is that the fourth column (FT_LCD_FILTER_LEGACY) is 
what you should get with the current cairo version.

some observations that can be made:

As expected, when using the bytecode interpreter the type of LCD 
filtering has not much impact on the rendered images. The glyphs with 
the legacy filter are a bit thinner that the one with the default one.

When using the autohinter (which is the default on some distributions 
like Fedora because of patent issues), the difference is more 
noticeable. The none filter (first column) shows visible color artifacts 
which are not very pleasant. While this is less visible, I can see more 
color fringes on my screen with the legacy filter in comparison to the 
default one.

The original patch made by David Turner which enables LCD filtering in 
cairo always uses the default filtering option when subpixel 
antialiasing is active.

Later on, the Debian developers modified the patch to retrieve the lcd 
filtering type from the Xrdb database (like what is done for 
antialiasing, hinting or subpixel order).

Right now there is no link between fontconfig and the LCD filter option yet.

Before going further, I'm wondering if it makes sense to make this value 
configurable or if we should just always use the default filter. When 
using the bytecode interpreter there is not much difference and it can 
improve the output when using the autohinter.

I think each approaches have their advantages and disadvantage, I'm 
starting the discussion to decide what would be the best way to take.

Note that the same choice can be made for Xft, which hasn't integrated 
the LCD filtering patch yet.


Sylvain



More information about the cairo mailing list