+ info->stage[0] = current_stage[0];
+ info->stage[1] = current_stage[1];
+}
+
+void hb_ot_map_t::apply (unsigned int table_index,
+ hb_ot_map_t::apply_lookup_func_t apply_lookup_func,
+ void *face_or_font,
+ hb_buffer_t *buffer) const
+{
+ unsigned int i = 0;
+
+ for (unsigned int pause_index = 0; pause_index < pauses[table_index].len; pause_index++) {
+ const pause_map_t *pause = &pauses[table_index][pause_index];
+ for (; i < pause->num_lookups; i++)
+ apply_lookup_func (face_or_font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask);
+
+ pause->callback.func (this, face_or_font, buffer, pause->callback.user_data);
+ }
+
+ for (; i < lookups[table_index].len; i++)
+ apply_lookup_func (face_or_font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask);
+}
+
+
+void hb_ot_map_builder_t::add_pause (unsigned int table_index, hb_ot_map_t::pause_func_t pause_func, void *user_data)
+{
+ if (pause_func) {
+ pause_info_t *p = pauses[table_index].push ();
+ if (likely (p)) {
+ p->stage = current_stage[table_index];
+ p->callback.func = pause_func;
+ p->callback.user_data = user_data;
+ }
+ }
+
+ current_stage[table_index]++;