From 6732d62e78b13842ead9549c97bede25c73976cb Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 23 Aug 2012 15:19:45 -0400 Subject: [PATCH] [Indic] Implement pre-base reordering Ra for old-spec Malayalam Fixes Pa,H,Ra sequence with AnjaliNewLipi.ttf. --- src/hb-ot-shape-complex-indic.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index a40f51ff8..e2a6f5803 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -694,13 +694,12 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, hb_buffer info[i].mask |= mask; } - /* XXX This will not match for old-Indic spec since the Halant-Ra order is reversed already. */ if (indic_plan->mask_array[PREF] && base + 2 < end) { /* Find a Halant,Ra sequence and mark it for pre-base reordering processing. */ for (unsigned int i = base + 1; i + 1 < end; i++) - if (is_halant_or_coeng (info[i]) && - info[i + 1].indic_category() == OT_Ra) + if (is_halant_or_coeng (info[i + (indic_plan->is_old_spec ? 1 : 0)]) && + info[i + (indic_plan->is_old_spec ? 0 : 1)].indic_category() == OT_Ra) { info[i++].mask |= indic_plan->mask_array[PREF]; info[i++].mask |= indic_plan->mask_array[PREF];