[texworks] Linux Application Bundle of TeXworks released

Laurence Field appbundles at gmail.com
Mon Sep 7 10:12:01 CEST 2009

>> I have made this build using a Poppler patch which allows for subpixel
>> rendering of text in PDF files---I find this sharpens the somewhat
>> spindly Computer Modern glyphs on screen quite considerably.
> I know this issue has come up on the poppler mailing list at times.
> Could you point me to the patch you're using? I'd be interested to try
> building poppler with this for other platforms as well, and see what
> the effect is on the display.

The patches I used are contained in the following mailing list post:


Unfortunately, the way this patch works is more complicated than would
be ideal.  The patch's author says that he investigated adding
subpixel support to the Splash backend of Poppler, but found the code
too inflexible to make subpixel rendering work easily, especially to
work correctly using text that was not on a white background.  So he
decided to use the Cairo backend instead of the Splash one.  As Cairo
is associated with the GTK+ stack and duplicates some of the
functionality of Qt4's Arthur, it seems that this patch is
unacceptable upstream because of toolkit politics.  Additionally,
while subpixel rendering will work with any version of Cairo, it seems
that Cairo defaults to using an inferior LCD filter which results in
unpleasant colour fringing.  Cairo gained an API for selecting a
better LCD filter in the (unstable) 1.7.4 release, but this was
removed before the stable version 1.8.0 was released, because the
Cairo maintainer did not like the design of the API.  So if you want
to select the better LCD filter, you need either to use Cairo 1.7.4 or
to patch a newer version of Cairo to add the LCD filter API (with a
patch which is linked from the above mailing list post).

It is annoying that the procedure is so complex, and it does not look
like a great long-term solution, but it is in working shape today,
whereas reworking Poppler-Qt4 and all the other needed parts of the
stack might take some time.

What I did in building the Application Bundle of TeXworks is to build
Poppler-Qt4, with the patches in the above mailing list post, as a
static library.  I also built Cairo version 1.7.4 as a static library,
with no patches (an alternative approach would be to build a newer
stable version of Cairo with the LCD filter patches).  I linked both
of those libraries statically to TeXworks, and I believe I changed one
line within TeXworks to select the Cairo backend instead of the Splash
one.  Linking Cairo statically is unfortunate but, I believe,
necessary; it shouldn't add more than 1MB to the binary if built

The bundle links dynamically to Fontconfig and Freetype, which are
more-or-less universal base libraries on Linux.  In particular, it is
Freetype that implements the superior LCD filtering.  I can't say for
sure whether the same patches would work on Windows and Mac OS X, but
perhaps it is worth a try.

More information about the texworks mailing list