[Poppler-bugs] [Bug 91772] Issue with text hinting of integral signs and parentheses

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Aug 30 11:57:26 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=91772

--- Comment #4 from Philipp Knechtges <philipp-dev at knechtges.com> ---
Created attachment 118002
  --> https://bugs.freedesktop.org/attachment.cgi?id=118002&action=edit
Comparison of freetype's autohinting vs the Adobe CFF hinting engine

After using mupdf's "mutool extract" to extract the used fonts and looking at
them with freetype's ftview tool, the problem can indeed be boiled down to an
issue in freetype's autohinter (cf. the attached screenshot). The integral
signs, which corresponds to the unicode character 'Z' in the font AdvP4C4E46,
and many other characters are not scaled correctly in the hinting process, if
autohinting is turned on.

In fact, this is a known issue according to the freetype documentation [1]:
> Note that the auto-hinter needs a valid Unicode cmap (either a native one or
> synthesized by FreeType) for producing correct results. If a font provides an
> incorrect mapping (for example, assigning the character code U+005A, LATIN
> CAPITAL LETTER Z, to a glyph depicting a mathematical integral sign), the
> auto-hinter might produce useless results.

I guess the conclusion from this analysis is twofold:
Firstly, one could consider to include the font in a list of 'tricky' fonts for
which the autohinter is just not applied. The latter seems to already exist in
freetype for TrueType fonts, but not for Type 1C or CFF fonts.
Secondly, the logic in SplashFTFont.cc:getFTLoadFlags probably needs to be
overhauled. E.g., for Type 1 fonts hinting always results in the inclusion of
the FT_LOAD_TARGET_LIGHT flag. Unfortunately, this flag seems to be a misnomer,
since according to the documentation it always implies autohinting. If I'm
reading the logic in getFTLoadFlags correctly, this means that one either gets
autohinting or no hinting at all, but never the shiny, new and highly
advertised CFF hinting engine in freetype provided by Adobe.

I haven't had the time yet to look into a possible patch, but maybe somebody
else sees a clever way to solve this :)

[1]
http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_LOAD_XXX

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20150830/41a2e0dd/attachment.html>


More information about the Poppler-bugs mailing list