Freetype LCD filtering support was removed from Cairo back in 2008. [1] So currently we have the (optional, via the 'cleartype' use flag) files/cairo-1.2.4-lcd-cleartype-like.diff which hard-codes a single (patent-infringing [2]) filtering implementation directly into cairo. If we agree that: 1. It's 2010 and real LCD filtering support is long-overdue 2. The Right Thing(tm) is for cairo to use the Real(tm) Freetype LCD filtering 3. ...according to the fontconfig 'lcdfilter' setting (just like 'hintstyle' etc.) 4. ...with the choice of whether to use patented LCD filtering or not centralised in one place: Freetype. Then the attached patch and updated ebuild delivers. It just replaces the freetype LCD filtering support that was removed from cairo. [1] http://cgit.freedesktop.org/cairo/commit/?id=5d887ad5dca5af0f8216830d1b04d08a5aba9bee [2] http://david.freetype.org/cleartype-patents.html
Created attachment 218361 [details] Updated ebuild
Created attachment 218363 [details, diff] Patch to go in files/
Note that this patch makes Cairo respect your 'lcdfilter' setting. For example try something like: $ cat ~/.Xdefaults Xft.antialias: 1 Xft.rgba: rgb Xft.lcdfilter: lcddefault Xft.hinting: 1 Xft.autohint: 1 Xft.hintstyle: hintslight
Created attachment 218389 [details] Screenshot
Created attachment 218391 [details] Screenshot (CJK text)
Where did your patch come from?
Created attachment 218887 [details, diff] Patch to go in files/
Hi Doug, From somewhere random found with Google, which I realise might not be a good answer. So I've recreated the patch from the Cairo git diff... http://cgit.freedesktop.org/cairo/commit/?id=5d887ad5dca5af0f8216830d1b04d08a5aba9bee ...with a two-line change making the default filtering algorithm FIR5 (new) instead of LEGACY (old). The new patch is also less disruptive in that it doesn't add anything to the public API, whereas the old one did (cairo_font_options_get/set_lcd_filter). Regards, Ron
*** Bug 306053 has been marked as a duplicate of this bug. ***
It would be great if the patch attached here or on bug 306053 could be applied, bringing font rendering in gentoo on par with other distributions.
I've added cairo-1.8.8-r1 to the tree with a new USE flag: lcdfilter, which applies the patch from Ubuntu, and takes precedence over the cleartype USE flag (if both are enabled then the lcdfilter patch gets applies and the cleartype patch doesn't).
This has disappeared from version 1.10.0, would work this patch on that new version?
(In reply to comment #12) > This has disappeared from version 1.10.0, would work this patch on that new > version? > Upstream already includes the patch.