You are not logged in.

#1 2016-01-05 04:35:41

zhou13
Member
Registered: 2009-10-07
Posts: 35

PDF subpixel rendering in evince/poppler-glib

Hi forks,

This is an effort to bring the subpixel rendering of PDF into Linux.

Installation

In order to enable subpixel rendering in evince, you need to install at least the following three packages from AUR: poppler-lcdfilter, poppler-glib-lcdfilter, and evince-lcdfilter.  To install them using yaourt, execute

 yaourt -S poppler-lcdfilter poppler-glib-lcdfilter evince-lcdfilter

In order to obtain the optimal result (just like the screenshots in the gallery), you need to install the infinality patched freetype and a cairo with my patch.  I would recommand you to install the infinality-bundle first.  You can refer to the tutorial https://bbs.archlinux.org/viewtopic.php?id=162098.  Then you should install my patched cairo, cairo-infinality-lcdfilter in AUR.

yaourt -S cairo-infinality-lcdfilter

For more information and technique details, please refer to my github page of this patchset: https://github.com/zhou13/poppler-subpixel.

Gallery

Left side: subpixel rendering result (after patch)

Right side: gray-scale rendering result (before patch)

https://github.com/zhou13/poppler-subpi … ournal.png
https://github.com/zhou13/poppler-subpi … _serif.png
https://github.com/zhou13/poppler-subpi … mg/cjk.png

Please leave your feedback and report issues in this thread. Thank you.

Last edited by zhou13 (2016-01-05 07:36:27)

Offline

#2 2016-01-05 08:01:42

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: PDF subpixel rendering in evince/poppler-glib

Nice work! Is it your intention to upstream these patches?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#3 2016-01-05 22:41:03

zhou13
Member
Registered: 2009-10-07
Posts: 35

Re: PDF subpixel rendering in evince/poppler-glib

Unia wrote:

Nice work! Is it your intention to upstream these patches?

Yes.  I will try to submit them upstream. But according to the history, it may take a long time to refine such patch until upstream can finally accept them. (cairo-respect-fontconfig.patch has 7-year-old history and is still not be merged)

Offline

#4 2016-03-25 00:26:35

Soumyadeep
Member
From: kolkata,India
Registered: 2009-09-09
Posts: 218

Re: PDF subpixel rendering in evince/poppler-glib

Came here to say that your patch-set produces excellent results! I was using adobe reader as it was the only PDF reader on Linux that could render properly smoothed fonts and now I can get rid of that.
Totally appreciate this, can you please add this support to Okular as well?

Offline

#5 2016-03-26 19:37:07

zhou13
Member
Registered: 2009-10-07
Posts: 35

Re: PDF subpixel rendering in evince/poppler-glib

Soumyadeep wrote:

Came here to say that your patch-set produces excellent results! I was using adobe reader as it was the only PDF reader on Linux that could render properly smoothed fonts and now I can get rid of that.
Totally appreciate this, can you please add this support to Okular as well?

The upstream okular uses Splash as the backend, which is harder to deal with.  In order to support okular properly, you need to patch poppler-qt to use cairo https://github.com/giddie/poppler-qt4-cairo-backend .  That patch should work in most case.  Since such work is rejected by upstream, I don't think I will work on it unless I go back to KDE.

Offline

Board footer

Powered by FluxBB