|
From: | Nikolaus Waxweiler |
Subject: | [ft-devel] Stem darkening toggling API |
Date: | Sun, 21 Aug 2016 22:22:49 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hey list,so I finally got around implementing a concept: a new API entry point `FT_Face_SetStemDarkening( FT_Face face, FT_Bool enable )`. It toggles a new member of FT_FaceRec `no_stem_darkening`. Font drivers and the autohinter poll this member to decide if they must darken stems. `FT_Load_Glyph(...)` now modifies the load flags because only the CFF driver darkens stems both when and when not hinting, all other cases need the light autohinter. This means you're currently limited to autohinting on all drivers except the CFF one. It currently somewhat breaks `FT_LOAD_TARGET_LCD` though, must see about that still. And I may have gotten some combinatorial flag cases wrong.
https://github.com/madig/freetype2/tree/stem-darkening-apiTo make this work more orthogonally, I'd need to implement stem darkening in the TT and T1 drivers when not hinting and when hinting in v40 compatibility mode (at least horizontally). Other TT hinting modes are conceptually incompatible with stem darkening due to the explicit nature of TT programming.
To get rid of duplication, the `no_stem_darkening` property should probably be removed from the drivers and the darkening_parameters moved to FT_Face.
So, comments?
[Prev in Thread] | Current Thread | [Next in Thread] |