freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] gamma correction and stem darkening


From: Derek B. Noonburg
Subject: [ft-devel] gamma correction and stem darkening
Date: Fri, 15 Jan 2016 11:45:09 -0800 (PST)

I've been motivated by the discussion here to work on implementing
proper gamma correction in Xpdf.  I'm running into some issues with
text display using FreeType.

The font types I need to support are:
* Type 1
* CFF
* TrueType

I'm dealing with the fonts that are embedded in PDF files, so it's
common to find subsets, which may or may not have valid encoding
information -- which can cause problems for the autohinter.

The other issue is that I occasionally run into "tricky" TrueType
fonts (in the FT_FACE_FLAG_TRICKY sense: CJK fonts that use hinting
instructions to move points around), with random font names -- which
means there's no way (as far as I know) to detect that they're tricky.

What I'm currently trying:
* use FreeType 2.6.2
* set no-stem-darkening to false for the cff driver
* set no-stem-darkening to false for the autofitter driver
* use FT_LOAD_TARGET_LIGHT

This seems to work pretty well for most fonts (Type 1, CFF, and
TrueType).  It even seems to work for TrueType fonts without a Unicode
cmap (though I still need to double-check that).

But it fails badly on tricky CJK TrueType fonts.

For high-quality output with gamma correction, I think I need both:
(1) native hinting for TrueType fonts -- otherwise tricky CJK fonts
    fail
(2) stem darkening -- otherwise the text is too light after gamma
    correction

But I don't see any way to get both of those.

Does anyone have suggestions?

- Derek




reply via email to

[Prev in Thread] Current Thread [Next in Thread]