Comment 15 for bug 48146

Revision history for this message
Sergei Ivanov (svivanov) wrote : Re: Poor font rendering in kpdf

I fond the origin of the problem and a solution. The rendering propblem occurs when you have all of the following:

1. TrueType bytecode interpreter enabled in the freetype library. (This is a compile-time option which is off by default due to patent issues, Ubuntu turns it on while Fedora does not.)

2. Kpdf using anti-aliasing. (No idea where this is configured, maybe from the global KDE setting).

3. A pdf file with embedded bitmapped (or maybe any non-TrueType) fonts. This is typical for pdfs generated by TeX.

When all of this happens, kpdf uses its own (or KDE's) anti-aliasing *and* freetype's autohinting. Each of the features is supposed to improve the view but their combination works poorly.

A solution is to turn off the check for bytecode interpreter in kpdf. On Ubuntu, this piece of code actually lives in libpoppler which is a separate package. The attached patch to poppler fixes the problem for me. I don't know if it breaks something else. I checked evince and it does not seem to be affected.

The same file is present in kpdf source. It should be patched there if kpdf is compiled without poppler.