diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 9304dde2e2a321fd714c272e4c0ed486b632b0e5..45b5825c51c4e94a0a254082a905bfaa3c19b107 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -1186,6 +1186,13 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, base--; break; } + if (base == end && start < base && + info[base - 1].indic_category() != OT_ZWJ) + base--; + while (start < base && + (info[base].indic_category() == OT_H || + info[base].indic_category() == OT_N)) + base--; /* o Reorder matras: