mupdf and freetype: why are fonts blurred?

对着背影说爱祢 提交于 2019-12-08 14:46:14

问题


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:


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.



来源:https://stackoverflow.com/questions/10607029/mupdf-and-freetype-why-are-fonts-blurred

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!