diff --git a/src/hb-aat-layout-common-private.hh b/src/hb-aat-layout-common-private.hh index a421a4cf0f9888cf5341b68258beec9c48c5f166..e0f59a4ad65ea074eab82ab0f9926d5f2a8a8248 100644 --- a/src/hb-aat-layout-common-private.hh +++ b/src/hb-aat-layout-common-private.hh @@ -713,6 +713,8 @@ struct hb_aat_apply_context_t : sanitizer.start_processing (); } + inline void set_lookup_index (unsigned int i) { lookup_index = i; } + inline ~hb_aat_apply_context_t (void) { sanitizer.end_processing (); diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index f16f6a4ad7c4c822a65071a5e6f83fbafab73852..f8209a6004acbd8fbd757b2abd9b8fb4ca20f4cf 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -617,6 +617,8 @@ struct Chain { subtable->apply (c); subtable = &StructAfter (*subtable); + + c->set_lookup_index (c->lookup_index + 1); } } @@ -670,6 +672,7 @@ struct morx inline void apply (hb_aat_apply_context_t *c) const { + c->set_lookup_index (0); const Chain *chain = chains; unsigned int count = chainCount; for (unsigned int i = 0; i < count; i++)