82 hb_ot_map_t (void) { memset (this, 0, sizeof (*this)); } |
82 hb_ot_map_t (void) { memset (this, 0, sizeof (*this)); } |
83 |
83 |
84 inline hb_mask_t get_global_mask (void) const { return global_mask; } |
84 inline hb_mask_t get_global_mask (void) const { return global_mask; } |
85 |
85 |
86 inline hb_mask_t get_mask (hb_tag_t feature_tag, unsigned int *shift = nullptr) const { |
86 inline hb_mask_t get_mask (hb_tag_t feature_tag, unsigned int *shift = nullptr) const { |
87 const feature_map_t *map = features.bsearch (&feature_tag); |
87 const feature_map_t *map = features.bsearch (feature_tag); |
88 if (shift) *shift = map ? map->shift : 0; |
88 if (shift) *shift = map ? map->shift : 0; |
89 return map ? map->mask : 0; |
89 return map ? map->mask : 0; |
90 } |
90 } |
91 |
91 |
92 inline bool needs_fallback (hb_tag_t feature_tag) const { |
92 inline bool needs_fallback (hb_tag_t feature_tag) const { |
93 const feature_map_t *map = features.bsearch (&feature_tag); |
93 const feature_map_t *map = features.bsearch (feature_tag); |
94 return map ? map->needs_fallback : false; |
94 return map ? map->needs_fallback : false; |
95 } |
95 } |
96 |
96 |
97 inline hb_mask_t get_1_mask (hb_tag_t feature_tag) const { |
97 inline hb_mask_t get_1_mask (hb_tag_t feature_tag) const { |
98 const feature_map_t *map = features.bsearch (&feature_tag); |
98 const feature_map_t *map = features.bsearch (feature_tag); |
99 return map ? map->_1_mask : 0; |
99 return map ? map->_1_mask : 0; |
100 } |
100 } |
101 |
101 |
102 inline unsigned int get_feature_index (unsigned int table_index, hb_tag_t feature_tag) const { |
102 inline unsigned int get_feature_index (unsigned int table_index, hb_tag_t feature_tag) const { |
103 const feature_map_t *map = features.bsearch (&feature_tag); |
103 const feature_map_t *map = features.bsearch (feature_tag); |
104 return map ? map->index[table_index] : HB_OT_LAYOUT_NO_FEATURE_INDEX; |
104 return map ? map->index[table_index] : HB_OT_LAYOUT_NO_FEATURE_INDEX; |
105 } |
105 } |
106 |
106 |
107 inline unsigned int get_feature_stage (unsigned int table_index, hb_tag_t feature_tag) const { |
107 inline unsigned int get_feature_stage (unsigned int table_index, hb_tag_t feature_tag) const { |
108 const feature_map_t *map = features.bsearch (&feature_tag); |
108 const feature_map_t *map = features.bsearch (feature_tag); |
109 return map ? map->stage[table_index] : (unsigned int) -1; |
109 return map ? map->stage[table_index] : (unsigned int) -1; |
110 } |
110 } |
111 |
111 |
112 inline void get_stage_lookups (unsigned int table_index, unsigned int stage, |
112 inline void get_stage_lookups (unsigned int table_index, unsigned int stage, |
113 const struct lookup_map_t **plookups, unsigned int *lookup_count) const { |
113 const struct lookup_map_t **plookups, unsigned int *lookup_count) const { |
196 } |
196 } |
197 |
197 |
198 private: |
198 private: |
199 |
199 |
200 HB_INTERNAL void add_lookups (hb_ot_map_t &m, |
200 HB_INTERNAL void add_lookups (hb_ot_map_t &m, |
201 hb_face_t *face, |
|
202 unsigned int table_index, |
201 unsigned int table_index, |
203 unsigned int feature_index, |
202 unsigned int feature_index, |
204 unsigned int variations_index, |
203 unsigned int variations_index, |
205 hb_mask_t mask, |
204 hb_mask_t mask, |
206 bool auto_zwnj = true, |
205 bool auto_zwnj = true, |