Forcing LCD filtering in the Cairo backend by setting cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_SUBPIXEL); inexplicably enables the gruesome LCD_FILTER_LEGACY algorithm. This patch corrects this silly behaviour and considerably improves font rendering. P.S.: Adding an extra fontconfig-ultimate USE flag that applies the patch available in https://github.com/bohoomil/fontconfig-ultimate/tree/master/cairo wouldn't hurt either. Reproducible: Always First picture: poppler + cairo-qt backend to enable subpixel rendering. Terrible fringes because it defaults to the legacy filter. Second picture: poppler + cairo-qt backend + cairo with this patch. Proper LCD filter, no fringes. http://screenshotcomparison.com/comparison/166497
Created attachment 428850 [details, diff] Makes LCD_FILTER_DEFAULT the actual default
Created attachment 428852 [details] ebuild
Created attachment 428854 [details] cairo-1.14.6.ebuild
Created attachment 428856 [details] cairo-1.14.4.ebuild
Created attachment 428858 [details] cairo-1.14.2-r1.ebuild
Created attachment 428860 [details] cairo-1.14.2.ebuild
Created attachment 428862 [details, diff] cairo-lcdfilter-make-default-default.patch Makes LCD_FILTER_DEFAULT the actual default
This is still relevant. I have just successfully applied the patch to cairo-git. There are literally no downsides to applying this patch.
(In reply to cristiano04 from comment #8) > This is still relevant. I have just successfully applied the patch to > cairo-git. There are literally no downsides to applying this patch. Rationale for this patch can be found here: https://bugs.freedesktop.org/show_bug.cgi?id=10301#c95
(In reply to cristiano04 from comment #8) > This is still relevant. I have just successfully applied the patch to > cairo-git. There are literally no downsides to applying this patch. If there are "literally no downsides" then please have the patch applied upstream. Patching live ebuilds is a mess. epatch_user works though. Feel free to do that. See https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Using_epatch_user
(In reply to Matt Turner from comment #10) > (In reply to cristiano04 from comment #8) > > This is still relevant. I have just successfully applied the patch to > > cairo-git. There are literally no downsides to applying this patch. > > If there are "literally no downsides" then please have the patch applied > upstream. > > Patching live ebuilds is a mess. epatch_user works though. Feel free to do > that. See > https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/ > Advanced#Using_epatch_user Did you not read the issue linked in comment 9? Besides, you could hide it behind a USE flag. The only thing this patch does is replace LCD_FILTER_LEGACY, which should never be used under any circumstances, with LCD_FILTER_DEFAULT. It's not removed, simply no longer the default LCD filter. Current Cairo, as used by poppler's qt backend, will default to FT_LCD_FILTER_LEGACY, since they removed cairo_font_options_set_lcd_filter(), which in turn results in hideous colour fringes. I am aware I can patch it myself with epatch, since that's precisely what I did when I submitted the fixed ebuilds. Here's an example of what I'm talking about, look at the i's and the l's, and then compare them: http://screenshotcomparison.com/comparison/166497 The original post explains it perfectly. As for making them merge it upstream, it wouldn't fix previous ebuilds, and they ignore the bug tracker.
(In reply to cristiano04 from comment #11) > As for making them merge it upstream, it wouldn't fix previous ebuilds, and > they ignore the bug tracker. Use the mailing list.