| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2009,2010 Red Hat, Inc. | 2 * Copyright © 2009,2010 Red Hat, Inc. |
| 3 * Copyright © 2010,2011,2012,2013 Google, Inc. | 3 * Copyright © 2010,2011,2012,2013 Google, Inc. |
| 4 * | 4 * |
| 5 * This is part of HarfBuzz, a text shaping library. | 5 * This is part of HarfBuzz, a text shaping library. |
| 6 * | 6 * |
| 7 * Permission is hereby granted, without written agreement and without | 7 * Permission is hereby granted, without written agreement and without |
| 8 * license or royalty fees, to use, copy, modify, and distribute this | 8 * license or royalty fees, to use, copy, modify, and distribute this |
| 9 * software and its documentation for any purpose, provided that the | 9 * software and its documentation for any purpose, provided that the |
| 10 * above copyright notice and the following two paragraphs appear in | 10 * above copyright notice and the following two paragraphs appear in |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 hb_prealloced_array_t<stage_map_t, 4> stages[2]; /* GSUB/GPOS */ | 152 hb_prealloced_array_t<stage_map_t, 4> stages[2]; /* GSUB/GPOS */ |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 enum hb_ot_map_feature_flags_t { | 155 enum hb_ot_map_feature_flags_t { |
| 156 F_NONE = 0x0000u, | 156 F_NONE = 0x0000u, |
| 157 F_GLOBAL = 0x0001u, /* Feature applies to all characters; results
in no mask allocated for it. */ | 157 F_GLOBAL = 0x0001u, /* Feature applies to all characters; results
in no mask allocated for it. */ |
| 158 F_HAS_FALLBACK = 0x0002u, /* Has fallback implementation, so include ma
sk bit even if feature not found. */ | 158 F_HAS_FALLBACK = 0x0002u, /* Has fallback implementation, so include ma
sk bit even if feature not found. */ |
| 159 F_MANUAL_ZWJ = 0x0004u, /* Don't skip over ZWJ when matching. */ | 159 F_MANUAL_ZWJ = 0x0004u, /* Don't skip over ZWJ when matching. */ |
| 160 F_GLOBAL_SEARCH = 0x0008u /* If feature not found in LangSys, look for
it in global feature list and pick one. */ | 160 F_GLOBAL_SEARCH = 0x0008u /* If feature not found in LangSys, look for
it in global feature list and pick one. */ |
| 161 }; | 161 }; |
| 162 HB_MARK_AS_FLAG_T (hb_ot_map_feature_flags_t); |
| 162 /* Macro version for where const is desired. */ | 163 /* Macro version for where const is desired. */ |
| 163 #define F_COMBINE(l,r) (hb_ot_map_feature_flags_t ((unsigned int) (l) | (unsigne
d int) (r))) | 164 #define F_COMBINE(l,r) (hb_ot_map_feature_flags_t ((unsigned int) (l) | (unsigne
d int) (r))) |
| 164 static inline hb_ot_map_feature_flags_t | |
| 165 operator | (hb_ot_map_feature_flags_t l, hb_ot_map_feature_flags_t r) | |
| 166 { return hb_ot_map_feature_flags_t ((unsigned int) l | (unsigned int) r); } | |
| 167 static inline hb_ot_map_feature_flags_t | |
| 168 operator & (hb_ot_map_feature_flags_t l, hb_ot_map_feature_flags_t r) | |
| 169 { return hb_ot_map_feature_flags_t ((unsigned int) l & (unsigned int) r); } | |
| 170 static inline hb_ot_map_feature_flags_t | |
| 171 operator ~ (hb_ot_map_feature_flags_t r) | |
| 172 { return hb_ot_map_feature_flags_t (~(unsigned int) r); } | |
| 173 static inline hb_ot_map_feature_flags_t& | |
| 174 operator |= (hb_ot_map_feature_flags_t &l, hb_ot_map_feature_flags_t r) | |
| 175 { l = l | r; return l; } | |
| 176 static inline hb_ot_map_feature_flags_t& | |
| 177 operator &= (hb_ot_map_feature_flags_t& l, hb_ot_map_feature_flags_t r) | |
| 178 { l = l & r; return l; } | |
| 179 | 165 |
| 180 | 166 |
| 181 struct hb_ot_map_builder_t | 167 struct hb_ot_map_builder_t |
| 182 { | 168 { |
| 183 public: | 169 public: |
| 184 | 170 |
| 185 HB_INTERNAL hb_ot_map_builder_t (hb_face_t *face_, | 171 HB_INTERNAL hb_ot_map_builder_t (hb_face_t *face_, |
| 186 const hb_segment_properties_t *props_); | 172 const hb_segment_properties_t *props_); |
| 187 | 173 |
| 188 HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value, | 174 HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 private: | 225 private: |
| 240 | 226 |
| 241 unsigned int current_stage[2]; /* GSUB/GPOS */ | 227 unsigned int current_stage[2]; /* GSUB/GPOS */ |
| 242 hb_prealloced_array_t<feature_info_t, 32> feature_infos; | 228 hb_prealloced_array_t<feature_info_t, 32> feature_infos; |
| 243 hb_prealloced_array_t<stage_info_t, 8> stages[2]; /* GSUB/GPOS */ | 229 hb_prealloced_array_t<stage_info_t, 8> stages[2]; /* GSUB/GPOS */ |
| 244 }; | 230 }; |
| 245 | 231 |
| 246 | 232 |
| 247 | 233 |
| 248 #endif /* HB_OT_MAP_PRIVATE_HH */ | 234 #endif /* HB_OT_MAP_PRIVATE_HH */ |
| OLD | NEW |