[Poppler-bugs] [Bug 78990] OTF and TTF versions of the same font render small type differently (hinting issue?)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jun 7 03:12:18 PDT 2014


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

--- Comment #13 from Jerome <ce0c5679c447a438 at spamherelots.com> ---
The freetype devs confirme that the stem darkening used by the 
adobe engine is the cause of the overly dark rendering of cff fonts
I reported.

See issue:
https://savannah.nongnu.org/bugs/index.php?42406

Stem darkening is turned on by default, and assumes (As I understand it)
that poppler properly handles "gamma", whatever that means in this context,
which if not done has the effect of displaying very dark glyphs at small type
size.

The freetype library has an option for disabling stem darkening,
as well as several numerical parameters for controlling it, whose
defaults the FT devs plan to change in the future when stem darkening
will be added to the other (ttf) engine as well.

See:
http://www.freetype.org/freetype2/docs/reference/ft2-cff_driver.html#FT_CFF_HINTING_XXX

By turning off stem darkening in the constructor for
CairoOutputDev (And also in splash hinting control, I do not know
which had the effect):

```
CairoOutputDev::CairoOutputDev() {
  ...

  FT_Bool     no_stem_darkening = true;
  FT_Property_Set( ft_lib, "cff",
                            "no-stem-darkening", &no_stem_darkening );
```

the issue has largely been resolved for me, there's still a slight difference
perhaps, but only when comparing side to side. I've attached a screenshot which
you can compare to the original I attached to the issue.

I'd like to suggest that poppler turn stem darkening off by default,
since it would:

1) Eliminate the problem of the dark glyphs.
2) Make ttf and ctf render in the same way (if they are mixed in a 
document for example).
3) Restore (roughly) the rendering behavior to what it was been
before the relatively recent introduction of the adobe engine.

If not, at least exposing an API for setting it by clients (Evince, okular)
would enable downstream to scratch their own itch.

Noting that since freetype releases are not often and this part of
the library seems to be in an interim state since one kind of font 
supports darkening it, the other does not, it might be a while before
this is resolved over there (though they were very helpful).

-- 
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/20140607/f91b69b4/attachment.html>


More information about the Poppler-bugs mailing list