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-api
To 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?
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel