Let's say we have a capital H with glyph level PS hints defined as on the image below. The question is how these hints communicate with the rasterizer in order to accomplish gridfitting.
In other words, we have H scaled down to the lower resolution, which looks wrong because of rounding errors (left stem is i.e. one-pixel size and the right is two, the bar is at the wrong position). And then PS autohint approaches rasterizer and says what?
Also, in that conversation, what means the hint position (bold green line) and what hint size?
Thanks!
Comments
Do you have a baseline blue (alignment) zone?
Yes, I have alignment zones defined, baseline zone as well (13pt size). Here is the new screenshot (with ghost zones restored):
Also, even though you're working in FLVI, the Glyphs tutorials autohinting is worth reading (so is the one on manual hinting, but the autohinting one provides more detail of how to set various values and what there effect is).
1. Three main functions of glyph level PS hints are to:
a) define what in the glyph should be considered as a vertical/horizontal stem
b) control the position of that identified stems (horizontal bar of H i.e.)
c) attach glyph elements to the alignment zones (using ghost hints).
2. Once vertical and horizontal stems in each glyph are identified by glyph level PS hints, rasterizer uses that information and compares with Standard Stems (defined on the font level) and makes:
a) elements of the glyph defined as stems at least 1px wide at any size.
b) the closest match from the offered standard stems.
3. The position of the stem (i.e. horizontal bar of H i.e.) is controlled by the position of the hint root line. In other words, while doing gridfitting, rasterizer tries to favor the edge of the stem where the root of the hint is (bold green line), while the ending of the hint (thin dashed line) is "gridfitted". Maybe like hint tells rasterizer: "wherever the edge on which I am resting falls, that pixel should be colored with black, no matter that edge doesn't catch the "pixel middle dot". And then apply the closest standard stem from there."
Thanks!
Is it true that an autohint alone (without being "attached" to the alignment zone) defines the thickness of the stem but not its exact position (where it falls on the raster grid).
This is fine for vertical stems, because pixel left/right is fine, but is awful for horizontal alignment. That's why we need ghost hints for those parts that are touching the zones but not going into it.
In short, hints are instructions for thickness, zones are for the position?
That does indeed have the effect of rounding a position up or down. This is generally used in conjunction with a standard position, such as the baseline, cap height, or x-height. An additional hint can maintain the thickness of the stem while the position is being adjusted. Blue zones are normally used to make things snap to those standard heights, which might otherwise go beyond them. But AFAIK they do not change the base position, only things that deviate from it.
I have a hint for the mid bar (making the bar sharp), but seems that I need to define a zone only for it (to control the position), right?