in Ideas · 176 words

If xpdf is in its default configuration, it uses X bitmap fonts to render the standard Postscript font set. This looks horrible on screen, because the character spacing ends up wrong due to integer rounding; xpdf renders strings as groups of single characters where the PDF says they should be, which is invariably a pixel to the left or right of where they would be if X was drawing the entire string.

A heuristic that could be used to improve this would be: for each character, find the previous character and add the appropriate spacing to work out where this character would have been drawn if it were part of a string, then if it's not too far away draw it in the "correct" place instead. (Essentially: reconstruct the strings, rather than trusting the PDF spacing.)

I'm not convinced that implementing this is worth the effort, though, since xpdf looks much better with Type 1 font rendering for the stock fonts anyway. Now, if it used fontconfig and Xft to render fonts, that would be perfect.