giddie / poppler-cairo-backend

A patchset to enable subpixel rendering of fonts via Cairo in Poppler's Qt wrapper
19 stars 2 forks source link

h1. Definitions

h1. Purpose of this Patchset

Currently, the default backend for the Qt5 wrapper (used by Okular) is Splash. Unfortunately, Splash does not support subpixel rendering of fonts, so those of us using KDE are stuck with somewhat ugly-looking fonts. This patchset adds support for the Cairo backend to the Qt5 wrapper. It also forces subpixel rendering in the Cairo backend. The upshot of this is that we get beautiful fonts in Okular.

h1. Why isn't this is Poppler already?

The Poppler developers feel that the introduction of a dependency on Cairo to the Qt5 wrapper (even an optional dependency) is politically controversial, and are not willing to merge it. For those of us who already have Cairo installed (e.g. for Firefox, Inkscape, Scribus, etc...), and are more worried about beautiful PDFs than toolkit politics, this patchset is here for us :) If you'd like to join the effort in convincing the developers that this is worthwhile, feel free to wade in on "the Bugzilla report":https://bugs.freedesktop.org/show_bug.cgi?id=25240.

There is a partly-implemented backend available in Poppler that uses Arthur, the Qt5 2D rendering interface. Sadly, it is nowhere near complete, and at the time of writing I'm not aware of anyone working on it. This patchset is a "quick fix" for the problem of font rendering in Okular. The Arthur backend might be a more elegant, long-term Qt-only solution, if it were completed.

h1. Organisation of this Repository

This repository tracks the official Poppler repository (git://git.freedesktop.org/git/poppler/poppler), and all Poppler's tags are present in this repository. However, my branches are a little different:

h1. Autotools / CMake

IMPORTANT: I test this patchset with CMake. It's been reported that it breaks the Autotools build. That's not something I'm very interested in fixing, but if you are, I'll happily merge a fix. In the mean time, you'll need to build with CMake:

$ cd <source-dir> $ mkdir build $ cd build $ cmake .. $ ccmake .. # (for any configuration tweaks) $ make

h1. How can I generate my own patch files?

Clone the repository:

bc. git clone git://github.com/giddie/poppler-cairo-backend.git

2 Change into the directory and checkout the the qt-lcd branch, which tracks Poppler's actual releases:

bc. cd poppler-qt-cairo-backend git checkout -b qt-lcd origin/qt-lcd

3 Generate patch files for all the commits between maint and the tip of the current branch:

bc. git format-patch origin/maint

4 The generated patch files should be applied in numerical order to Poppler's official source package. If you have difficulty, please get in touch--I'd be more than happy to help :)