[GSUB/GPOS] Remove context_length
The spec doesn't say contextual matching should be done this way,
and AOTS doesn't do it either. It was inherited from old HarfBuzz.
Remove it.
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index bc2b0e1..8c57f60 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -804,7 +804,8 @@
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
- if (unlikely (c->context_length != NO_CONTEXT)) return TRACE_RETURN (false); /* No chaining to this type */
+ if (unlikely (c->nesting_level_left != MAX_NESTING_LEVEL))
+ return TRACE_RETURN (false); /* No chaining to this type */
unsigned int index = (this+coverage) (c->buffer->info[c->buffer->idx].codepoint);
if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
@@ -1243,9 +1244,6 @@
if (unlikely (c->nesting_level_left == 0))
return false;
- if (unlikely (c->context_length < 1))
- return false;
-
hb_apply_context_t new_c (*c);
new_c.nesting_level_left--;
new_c.set_lookup (l);