diff --git a/bedstead.c b/bedstead.c index e0b12af..a875585 100644 --- a/bedstead.c +++ b/bedstead.c @@ -4472,12 +4472,21 @@ emit_hints(int vstems[XSIZE], int ledges[XSIZE], int redges[XSIZE], enum hint_type vhints[XSIZE], hhints[YSIZE]; bool printed, need_cntrmask = false; + /* + * We don't emit any counter hints for horizontal stems. On + * Microsoft Windows 11, such counter hints are treated as + * more important than alignment zones, so when the cap height + * is an even number of pixels you end up with 'B' being one + * pixel smaller than 'C' to ensure that the two counters are + * the same size. This is not actually what we want. + * FreeType 2.12.1 appears to entirely ignore those counter + * hints, so discarding them has no effect there. + */ select_hints(YSIZE, hstems, tedges, bedges, hhints); cur = DESCENT * YPIX; printed = false; for (i = 0; i < YSIZE; i++) { switch (hhints[YSIZE - 1 - i]) { case hint_counter_stem: - need_cntrmask = true; if (middle_stem_tweak_wanted(hhints, YSIZE - 1 - i)) { start = i * YPIX; size = YPIX + 1; @@ -4535,7 +4544,7 @@ emit_hints(int vstems[XSIZE], int ledges[XSIZE], int redges[XSIZE], printf(" cntrmask "); for (i = 0; i < YSIZE; i++) if (hhints[i]) { - printf("%c", "X0100"[hhints[i]]); + printf("0"); nhints++; } for (i = 0; i < XSIZE; i++)