More-or-less functional edge hints

This gets me to the milestone where the new version isn't uniformly
worse than the old one when rendered by FreeType at 10.5 ppem (the
worst size I've found).

The big problem I still have is that letters with three horizontal
stems (like 'B') get their middle stem rounded down in this version
and up in 002.009.  I think this is because FontForge generates and
edge hint and not a stem hint at the bottom of the character, which
also makes bottom stems rather fuzzy.  This version gives sharper
stems, but the characters all end up looking top-heavy.
This commit is contained in:
Ben Harris 2024-11-17 14:03:47 +00:00
parent 347dcfd579
commit b74582bccc

View File

@ -3870,6 +3870,14 @@ emit_hints(int vstems[XSIZE], int ledges[XSIZE], int redges[XSIZE],
start = i * YPIX_S;
size = YPIX_S;
break;
case hint_aedge: /* Top edge. */
start = (i + 1) * YPIX_S;
size = -20;
break;
case hint_zedge: /* Bottom edge. */
start = i * YPIX_S + 21;
size = -21;
break;
default: continue;
}
printf(" %g %g",
@ -3889,6 +3897,14 @@ emit_hints(int vstems[XSIZE], int ledges[XSIZE], int redges[XSIZE],
start = i * XPIX_S - weight->weight;
size = XPIX_S + weight->weight;
break;
case hint_aedge: /* Left edge. */
start = i * YPIX_S + 21;
size = -21;
break;
case hint_zedge: /* Right edge. */
start = (i + 1) * YPIX_S;
size = -20;
break;
default: continue;
}
printf(" %g %g",