[aat] Set debug lookup_index
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 7 Feb 2018 17:30:18 +0000 (12:30 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 7 Feb 2018 17:41:21 +0000 (12:41 -0500)
src/hb-aat-layout-common-private.hh
src/hb-aat-layout-morx-table.hh

index a421a4c..e0f59a4 100644 (file)
@@ -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 ();
index f16f6a4..f8209a6 100644 (file)
@@ -617,6 +617,8 @@ struct Chain
     {
       subtable->apply (c);
       subtable = &StructAfter<ChainSubtable> (*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++)