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;
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++)