From 40bfabd1f97d7ad665140ba764157a6058e6a3b7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 8 Aug 2023 12:17:25 -0600 Subject: [PATCH] [arabic/stch] Zero advances This was working for our test suite because those glyphs were declared mark and their advances zeroed automatically. But is not the case in eg. the font posted at: https://github.com/harfbuzz/harfbuzz/issues/4369 --- src/hb-ot-shaper-arabic.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hb-ot-shaper-arabic.cc b/src/hb-ot-shaper-arabic.cc index 256f8f1d1..12c7da22f 100644 --- a/src/hb-ot-shaper-arabic.cc +++ b/src/hb-ot-shaper-arabic.cc @@ -599,6 +599,7 @@ apply_stch (const hb_ot_shape_plan_t *plan HB_UNUSED, DEBUG_MSG (ARABIC, nullptr, "appending %u copies of glyph %u; j=%u", repeat, info[k - 1].codepoint, j); + pos[k - 1].x_advance = 0; for (unsigned int n = 0; n < repeat; n++) { x_offset -= width;