From: Ben Harris Date: Sun, 17 Nov 2024 14:03:47 +0000 (+0000) Subject: More-or-less functional edge hints X-Git-Tag: bedstead-3.246~21 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=b74582bccc3e7ffb674e0926569852b60c045698;p=bedstead-debian.git 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. --- diff --git a/bedstead.c b/bedstead.c index 459ec2c..1595431 100644 --- a/bedstead.c +++ b/bedstead.c @@ -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",