From dde5506fd963e3cec27c3389bb1fc092f86d1e06 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 14 Nov 2012 11:37:04 -0800 Subject: [PATCH] [Indic] Don't move virama with left matra This is important for the Sinhala U+0DDA split matra since it decomposes to U+0DD9,U+0DCA where U+0DD9 is a left matra and U+0DCA is the virama. We don't want to move the virama with the left matra. TEST: U+0D9A,U+0DDA Note that we were already doing this in the Uniscribe bug compatibility mode. We now do it all the time. --- src/hb-ot-shape-complex-indic.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index a948d5276..1c7de0dab 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -662,13 +662,17 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, if ((FLAG (info[i].indic_category()) & (JOINER_FLAGS | FLAG (OT_N) | FLAG (OT_RS) | HALANT_OR_COENG_FLAGS))) { info[i].indic_position() = last_pos; - if (unlikely (indic_options ().uniscribe_bug_compatible && - info[i].indic_category() == OT_H && + if (unlikely (info[i].indic_category() == OT_H && info[i].indic_position() == POS_PRE_M)) { /* * Uniscribe doesn't move the Halant with Left Matra. * TEST: U+092B,U+093F,U+094DE + * We follow. This is important for the Sinhala + * U+0DDA split matra since it decomposes to U+0DD9,U+0DCA + * where U+0DD9 is a left matra and U+0DCA is the virama. + * We don't want to move the virama with the left matra. + * TEST: U+0D9A,U+0DDA */ for (unsigned int j = i; j > start; j--) if (info[j - 1].indic_position() != POS_PRE_M) {