diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index ba2a7e0e1..5b0276f1f 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]); }