[Indic] Improve base finding in final_reordering
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 13 Feb 2013 14:26:55 +0000 (09:26 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 13 Feb 2013 14:26:55 +0000 (09:26 -0500)
Fixes 5 Malayalam failures!

MALAYALAM: 1048016 out of 1048334 tests passed. 318 failed (0.0303338%)

src/hb-ot-shape-complex-indic.cc

index 9304dde..45b5825 100644 (file)
@@ -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: