From a9e45c32e4a0d6da33c52f8427aa694e57f52eb9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 20 Jul 2012 11:04:15 -0400 Subject: [PATCH] [Indic] Don't let ZWNJ at the end of syllable affect base search Fixes a few Devanagari, half of remaining Kannada failures, quarter for Telugu, and others slightly improved or unchanged. --- src/hb-ot-shape-complex-indic.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index a3f20b1a..ffae4309 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -530,8 +530,12 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff base = i; } else - if (is_joiner (info[i])) + { + /* A ZWJ at the end of syllable, or any ZWJ/ZWNJ in other places, stop the base + * search (to request explicit half or halant forms. */ + if (is_joiner (info[i]) && (i + 1 < end || info[i].indic_category() == OT_ZWJ)) break; + } } while (i > limit); } else -- GitLab