Comment 12 for bug 26118

Revision history for this message
Marciano Siniscalchi (msiniscalchi) wrote : Re: Bad rendering (hinting) in Evince and Xpdf [FIX!]

I think I nailed it!

First of all, the exact same issue arises in Edgy, which is what I am using now. However, it's easy to fix.

Second, it's a poppler problem, not an Evince problem per se.

See file splash/SplashFTFont.cc in poppler-0.5.4 (the Edgy version), lines 180 and following. This is where poppler loads glyphs for the splash output device; this code comes from xpdf, btw.

Basically, there is a compile-time check to see whether freetype has the bytecode interpreter enabled; if so, IT IS USED regardless of whether anti-aliasing is on or off. Otherwise, no hinting is used if anti-aliasing is on. Again, this is a compile-time check.
The problem is that, for most fonts used with LaTeX (but I'd say for most other fonts, too) it's best to omit hinting altogether.

I fixed the problem by simply deleting the portion of the code that is triggered if TT_CONFIG_OPTION_BYTECODE is defined, and instead leaving only the section that is compiled if it is not. Rebuilding with pdebuild and installing with dpkg -i did the trick.

Ideally, this should be a gconf setting, I guess.

Hope this helps,
M