|
From: | Nikolaus Waxweiler |
Subject: | Re: [ft-devel] Autohinter: stem darkening, first rough prototype |
Date: | Sun, 20 Sep 2015 12:30:14 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
That's one of the difficulties I had with the emboldening support. I can't just modify aflatin.c and the others to embolden glyphs before analyzing them because the blue zones etc. are computed independently of pixel size and are fitted to a pixel size in a separate step, whereas emboldening depends on the pixel size. I'd simply get wrong metrics. I guess I either need to account for emboldening overshoot beforehand in af_*_metrics_init_blues or must implement/modify overshoot control in the hints-applier?
The other thing I thought about was implementing emboldening in the font drivers to have emboldening even without any hinting, like the CFF driver does by itself. The way the autohinter currently works may make this difficult: 1. The autohinter seems to get the naked glyphs in font units from the font driver for analysis (af_*_metrics_init_*) and rendering (af_loader_load_g) and does the rest itself, so emboldened glyphs of the font driver don't even reach the autohinter. That's why, in ftview, going from native hinter to autohinter (press A, then B) loses emboldening. I'd probably have to modify af_loader_load_g to take the normal outline as emitted by the font driver instead and apply hints to *that* outline. But then the hinting machinery may need to know about what the font driver did to the outline to update its' inner size-independent model of the outline. 2. OpenType/CFF and Type1 fonts specify stdVW/stdHW, but TrueType fonts don't. If the TT driver or any other shouldn't depend on the autohinter to get at that information, it either needs to implement analyzers itself (ugh) or use e.g. the 50/75/110 heuristic Dave mentioned. Or maybe the analysis part of the autohinter should be factored out?
Thoughts?
[Prev in Thread] | Current Thread | [Next in Thread] |