diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index abde1c153..fd8a68be0 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -53,14 +53,9 @@ template /*static*/ typename hb_closure_context_t::return_t SubstLookup::closure_glyphs_recurse_func (hb_closure_context_t *c, unsigned lookup_index, hb_set_t *covered_seq_indices, unsigned seq_index, unsigned end_index) { const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index); - if (covered_seq_indices && l.may_have_non_1to1 ()) + if (l.may_have_non_1to1 ()) hb_set_add_range (covered_seq_indices, seq_index, end_index); - - if (covered_seq_indices) - c->schedule (lookup_index); - else - l.dispatch (c); - return hb_empty_t (); + return l.dispatch (c); } template <> diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index a9c7017d8..e10adb78b 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -183,22 +183,8 @@ struct hb_closure_context_t : void set_recurse_func (recurse_func_t func) { recurse_func = func; } - void schedule (unsigned lookup_index) - { - scheduled.add (lookup_index); - } - void flush () { - hb_set_t scheduled_copy; - while (scheduled) - { - scheduled_copy = scheduled; - scheduled.clear (); - for (unsigned lookup_index : scheduled_copy) - recurse (lookup_index, nullptr, 0, 0); - } - output->del_range (face->get_num_glyphs (), HB_SET_VALUE_INVALID); /* Remove invalid glyphs. */ glyphs->union_ (*output); output->clear (); @@ -210,7 +196,6 @@ struct hb_closure_context_t : hb_map_t *done_lookups_glyph_count; hb_hashmap_t> *done_lookups_glyph_set; unsigned int lookup_count = 0; - hb_set_t scheduled; };