Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: third_party/harfbuzz-ng/src/hb-ot-map-private.hh

Issue 2622553002: Roll HarfBuzz to 1.4.1 (Closed)
Patch Set: Linux rebaselines Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-map.cc ('k') | third_party/harfbuzz-ng/src/hb-ot-math.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 stages[table_index].finish (); 132 stages[table_index].finish ();
133 } 133 }
134 } 134 }
135 135
136 public: 136 public:
137 hb_tag_t chosen_script[2]; 137 hb_tag_t chosen_script[2];
138 bool found_script[2]; 138 bool found_script[2];
139 139
140 private: 140 private:
141 141
142 HB_INTERNAL void add_lookups (hb_face_t *face,
143 unsigned int table_index,
144 unsigned int feature_index,
145 hb_mask_t mask,
146 bool auto_zwj);
147
148 hb_mask_t global_mask; 142 hb_mask_t global_mask;
149 143
150 hb_prealloced_array_t<feature_map_t, 8> features; 144 hb_prealloced_array_t<feature_map_t, 8> features;
151 hb_prealloced_array_t<lookup_map_t, 32> lookups[2]; /* GSUB/GPOS */ 145 hb_prealloced_array_t<lookup_map_t, 32> lookups[2]; /* GSUB/GPOS */
152 hb_prealloced_array_t<stage_map_t, 4> stages[2]; /* GSUB/GPOS */ 146 hb_prealloced_array_t<stage_map_t, 4> stages[2]; /* GSUB/GPOS */
153 }; 147 };
154 148
155 enum hb_ot_map_feature_flags_t { 149 enum hb_ot_map_feature_flags_t {
156 F_NONE = 0x0000u, 150 F_NONE = 0x0000u,
157 F_GLOBAL = 0x0001u, /* Feature applies to all characters; results in no mask allocated for it. */ 151 F_GLOBAL = 0x0001u, /* Feature applies to all characters; results in no mask allocated for it. */
(...skipping 17 matching lines...) Expand all
175 hb_ot_map_feature_flags_t flags); 169 hb_ot_map_feature_flags_t flags);
176 170
177 inline void add_global_bool_feature (hb_tag_t tag) 171 inline void add_global_bool_feature (hb_tag_t tag)
178 { add_feature (tag, 1, F_GLOBAL); } 172 { add_feature (tag, 1, F_GLOBAL); }
179 173
180 inline void add_gsub_pause (hb_ot_map_t::pause_func_t pause_func) 174 inline void add_gsub_pause (hb_ot_map_t::pause_func_t pause_func)
181 { add_pause (0, pause_func); } 175 { add_pause (0, pause_func); }
182 inline void add_gpos_pause (hb_ot_map_t::pause_func_t pause_func) 176 inline void add_gpos_pause (hb_ot_map_t::pause_func_t pause_func)
183 { add_pause (1, pause_func); } 177 { add_pause (1, pause_func); }
184 178
185 HB_INTERNAL void compile (struct hb_ot_map_t &m); 179 HB_INTERNAL void compile (hb_ot_map_t &m,
180 » » » const int *coords,
181 » » » unsigned int num_coords);
186 182
187 inline void finish (void) { 183 inline void finish (void) {
188 feature_infos.finish (); 184 feature_infos.finish ();
189 for (unsigned int table_index = 0; table_index < 2; table_index++) 185 for (unsigned int table_index = 0; table_index < 2; table_index++)
190 { 186 {
191 stages[table_index].finish (); 187 stages[table_index].finish ();
192 } 188 }
193 } 189 }
194 190
195 private: 191 private:
196 192
193 HB_INTERNAL void add_lookups (hb_ot_map_t &m,
194 hb_face_t *face,
195 unsigned int table_index,
196 unsigned int feature_index,
197 unsigned int variations_index,
198 hb_mask_t mask,
199 bool auto_zwj);
200
197 struct feature_info_t { 201 struct feature_info_t {
198 hb_tag_t tag; 202 hb_tag_t tag;
199 unsigned int seq; /* sequence#, used for stable sorting only */ 203 unsigned int seq; /* sequence#, used for stable sorting only */
200 unsigned int max_value; 204 unsigned int max_value;
201 hb_ot_map_feature_flags_t flags; 205 hb_ot_map_feature_flags_t flags;
202 unsigned int default_value; /* for non-global features, what should the unse t glyphs take */ 206 unsigned int default_value; /* for non-global features, what should the unse t glyphs take */
203 unsigned int stage[2]; /* GSUB/GPOS */ 207 unsigned int stage[2]; /* GSUB/GPOS */
204 208
205 static int cmp (const feature_info_t *a, const feature_info_t *b) 209 static int cmp (const feature_info_t *a, const feature_info_t *b)
206 { return (a->tag != b->tag) ? (a->tag < b->tag ? -1 : 1) : 210 { return (a->tag != b->tag) ? (a->tag < b->tag ? -1 : 1) :
(...skipping 19 matching lines...) Expand all
226 private: 230 private:
227 231
228 unsigned int current_stage[2]; /* GSUB/GPOS */ 232 unsigned int current_stage[2]; /* GSUB/GPOS */
229 hb_prealloced_array_t<feature_info_t, 32> feature_infos; 233 hb_prealloced_array_t<feature_info_t, 32> feature_infos;
230 hb_prealloced_array_t<stage_info_t, 8> stages[2]; /* GSUB/GPOS */ 234 hb_prealloced_array_t<stage_info_t, 8> stages[2]; /* GSUB/GPOS */
231 }; 235 };
232 236
233 237
234 238
235 #endif /* HB_OT_MAP_PRIVATE_HH */ 239 #endif /* HB_OT_MAP_PRIVATE_HH */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-map.cc ('k') | third_party/harfbuzz-ng/src/hb-ot-math.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698