mupdf and freetype: why are fonts blurred?

2.1k views Asked by At

I would like to know if it is mupdf's or freetype2's fault if the font is blurred (even with antialiasing). This is using the pdfdraw utility on Windows.

1

There are 1 answers

0
iPDFdev On BEST ANSWER

As I mentioned in my other answer, the glyph description is composed of lines and curves. The problem is these lines and curves cannot ensure high fidelity glyph rendering at small sizes because there is not much space to represent the glyph. In this situation a technique called font hinting is used to render readable glyphs. TrueType fonts include such hinting information in the font file. Hinting basically specifies how the font outlines are fitted to the pixel grid, you can read more here. Another method to improve the font rendering is to use subpixel rendering on LCD displays.

The difference you noticed in rendering comes from the fact that Adobe Reader uses the hinting information (and other proprietary rendering methods) while mupdf simply renders the lines and curves. mupdf uses FreeType for font rendering and FreeType might not use hinting by default (I might be mistaken here). As far as I know FreeType supports font hinting but maybe you need to specify this when you built it, I'm not sure. It is also possible that mupdf initializes the FreeType library without hinting support but I do not know these details.