Page MenuHomeSolus

cairo / evince / poppler patch
Closed, InvalidPublic

Description

Patch: https://github.com/zhou13/poppler-subpixel/blob/master/cairo/cairo-lcdfilter-make-default-default.patch

Current Cairo, as used by poppler's qt4 backend (should be patched as well), will default to FT_LCD_FILTER_LEGACY, since they removed cairo_font_options_set_lcd_filter(), which in turn results in hideous colour fringes.

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

Further rationale for this patch can be found here: https://bugs.freedesktop.org/show_bug.cgi?id=10301#c95

On a side note, patching evince and poppler to also support subpixel rendering with the zhou13 patchset found here https://github.com/zhou13/poppler-subpixel would offer tremendous quality benefits, but I know how conservative distro managers can be when it comes to patching software.

Event Timeline

BRM created this task.Nov 20 2016, 5:43 PM

Does this offer benefits outside of poppler?

BRM added a comment.EditedNov 20 2016, 7:15 PM

I don't think so since most software other than poppler uses fontconfig, which can set the lcdfilter, but then again, most PDF viewers use poppler's cairo backend (save for the qt4 ones like okular without this https://github.com/giddie/poppler-qt4-cairo-backend that use splash). Using cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_SUBPIXEL); will enable the awful LCD_FILTER_LEGACY algorithm instead of the LCD_FILTER_DEFAULT 5-tap FIR filter (which is the actual default one).
You can read about in the issue that I posted.

Lots of people hate the legacy filter as you can see here https://web.archive.org/web/20090201223104/http://ubuntuforums.org/showthread.php?t=555964

Thanks!

BRM added a comment.Nov 20 2016, 7:17 PM

Can see a comprehensive list of examples of the filters here http://www.spasche.net/files/lcdfiltering/

BRM added a comment.Nov 27 2016, 6:52 PM

It's not working on poppler-0.44 and newer, but zhou is investigating.

BRM changed the task status from Open to In Progress.Nov 29 2016, 1:38 AM
DataDrake triaged this task as Normal priority.Dec 25 2016, 1:03 AM
DataDrake added a project: Patch Submission.
DataDrake moved this task from Backlog to Awaiting Fixes on the Patch Submission board.

All patches marked as "Awaiting Fixes", that haven't been corrected, will have to be re submitted via Diffusion.
Please see the submission documentation, where the new process will shortly be made available.