mirror of
https://bjh21.me.uk/bedstead/.git
synced 2026-07-10 14:03:06 -04:00
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:
parent
347dcfd579
commit
b74582bccc
16
bedstead.c
16
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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user