From c23b79f1cb599ee7766002ad23756643e72113e5 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 28 Sep 2026 14:48:00 +0100 Subject: Give Telugu's length marks classes 4 and 5, as HarfBuzz 10.2 does HarfBuzz reorders marks by a modified combining class; for U+0C55 and U+0C56 (canonical classes 84 and 91) it is 4 and 5, so they sort before the virama. Vega had 0, which rustybuzz 0.20 uses; HarfBuzz 10.2's hb-unicode.hh says otherwise, and Unifont's Telugu showed it. --- text/shape.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'text/shape.c') diff --git a/text/shape.c b/text/shape.c index 0016fa0..0813bae 100644 --- a/text/shape.c +++ b/text/shape.c @@ -568,7 +568,8 @@ static bool default_ignorable(uint32_t ch) { static bool variation_selector(uint32_t ch) { return (ch >= 0xFE00 && ch <= 0xFE0F) || (ch >= 0xE0100 && ch <= 0xE01EF); } /* Canonical_Combining_Class as HarfBuzz reorders by: Hebrew's fixed - * positions in the SBL order, Arabic's shadda before the other marks. */ + * positions in the SBL order, Arabic's shadda before the other marks, + * Telugu's length marks before the virama (hb-unicode.hh). */ static unsigned modified_combining_class(uint32_t u) { if (u == 0x1A60 || u == 0x0FC6) return 254; if (u == 0x0F39) return 127; @@ -577,7 +578,8 @@ static unsigned modified_combining_class(uint32_t u) { unsigned c = vega_combining_class(u); if (c >= 10 && c <= 36) return hebrew_arabic[c - 10]; switch (c) { - case 84: case 91: return 0; + case 84: return 4; + case 91: return 5; case 103: return 3; case 130: return 132; case 132: return 131; -- cgit v1.2.3