- static int cmp (const feature_info_t *a, const feature_info_t *b)
- { return (a->tag != b->tag) ? (a->tag < b->tag ? -1 : 1) : (a->seq < b->seq ? -1 : 1); }
- };
+ inline hb_mask_t get_global_mask (void) const { return global_mask; }
+
+ inline hb_mask_t get_mask (hb_tag_t tag, unsigned int *shift = NULL) const {
+ const feature_map_t *map = features.bsearch (&tag);
+ if (shift) *shift = map ? map->shift : 0;
+ return map ? map->mask : 0;
+ }
+
+ inline hb_mask_t get_1_mask (hb_tag_t tag) const {
+ const feature_map_t *map = features.bsearch (&tag);
+ return map ? map->_1_mask : 0;
+ }
+
+ inline void substitute (hb_face_t *face, hb_buffer_t *buffer) const
+ { apply (0, (hb_ot_map_t::apply_lookup_func_t) hb_ot_layout_substitute_lookup, face, buffer); }
+ inline void position (hb_font_t *font, hb_buffer_t *buffer) const
+ { apply (1, (hb_ot_map_t::apply_lookup_func_t) hb_ot_layout_position_lookup, font, buffer); }
+
+ inline void finish (void) {
+ features.finish ();
+ lookups[0].finish ();
+ lookups[1].finish ();
+ pauses[0].finish ();
+ pauses[1].finish ();
+ }
+
+ private: