src/hb-ot-layout-gsubgpos-private.hh | 8 +++++--- src/hb-ot-shape-complex-indic.cc | 5 ++--- 2 files changed, 7 insertions(+), 6 deletions(-)
New commits: commit 24dd4e56743c6ce5e01cb710ca9e01b3e527af58 Author: Behdad Esfahbod <[email protected]> Date: Thu Aug 23 15:47:10 2012 -0400 [Indic/GSUB] Ignore context when matching would_apply() The MS Indic specs say "...all classifications are determined ... using context-free substitutions." However, testing shows that MS's Malayalam shapers (both old and new), "match" even if there is no zero-context rule. We follow. Fixes below-base La (eg. Pa,H,La) with AnjaliNewLipi.ttf (old spec). Moreover, test suite Malayalam failures are down to 312 from 875! No change in other scripts. Current numbers: BENGALI: 353996 out of 354285 tests passed. 289 failed (0.0815727%) DEVANAGARI: 707339 out of 707394 tests passed. 55 failed (0.00777502%) GUJARATI: 366489 out of 366506 tests passed. 17 failed (0.0046384%) GURMUKHI: 60769 out of 60809 tests passed. 40 failed (0.0657797%) KANNADA: 951086 out of 951913 tests passed. 827 failed (0.0868777%) KHMER: 299106 out of 299124 tests passed. 18 failed (0.00601757%) LAO: 53611 out of 53644 tests passed. 33 failed (0.0615167%) MALAYALAM: 1047541 out of 1048416 tests passed. 875 failed (0.0834592%) ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%) SINHALA: 271726 out of 271847 tests passed. 121 failed (0.0445103%) TAMIL: 1091837 out of 1091837 tests passed. 0 failed (0%) TELUGU: 970558 out of 970573 tests passed. 15 failed (0.00154548%) TIBETAN: 208469 out of 208469 tests passed. 0 failed (0%) diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index ba2a7e0..5b0276f 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -1066,9 +1066,11 @@ static inline bool chain_context_would_apply_lookup (hb_would_apply_context_t *c const LookupRecord lookupRecord[], ChainContextApplyLookupContext &lookup_context) { - return !backtrackCount - && !lookaheadCount - && would_match_input (c, + /* The MS Indic specs say "...all classifications are determined ... using context-free substitutions." + * However, testing shows that MS's Malayalam shapers (both old and new), "match" even if there is no + * zero-context rule. We follow. Hence the commented out line. */ + return /* !backtrackCount && !lookaheadCount && */ + would_match_input (c, inputCount, input, lookup_context.funcs.match, lookup_context.match_data[1]); } commit 6732d62e78b13842ead9549c97bede25c73976cb Author: Behdad Esfahbod <[email protected]> Date: Thu Aug 23 15:19:45 2012 -0400 [Indic] Implement pre-base reordering Ra for old-spec Malayalam Fixes Pa,H,Ra sequence with AnjaliNewLipi.ttf. diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index a40f51f..e2a6f58 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]; _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
