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

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

Issue 205003003: Update harfbuzz-ng to 0.9.27 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: w/missing files Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright © 2010,2011,2012 Google, Inc. 2 * Copyright © 2010,2011,2012 Google, Inc.
3 * 3 *
4 * This is part of HarfBuzz, a text shaping library. 4 * This is part of HarfBuzz, a text shaping library.
5 * 5 *
6 * Permission is hereby granted, without written agreement and without 6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this 7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the 8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in 9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software. 10 * all copies of this software.
(...skipping 26 matching lines...) Expand all
37 /* buffer var allocations, used by complex shapers */ 37 /* buffer var allocations, used by complex shapers */
38 #define complex_var_u8_0() var2.u8[2] 38 #define complex_var_u8_0() var2.u8[2]
39 #define complex_var_u8_1() var2.u8[3] 39 #define complex_var_u8_1() var2.u8[3]
40 40
41 41
42 enum hb_ot_shape_zero_width_marks_type_t { 42 enum hb_ot_shape_zero_width_marks_type_t {
43 HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE, 43 HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
44 // HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_EARLY, 44 // HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_EARLY,
45 HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_LATE, 45 HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_LATE,
46 HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY, 46 HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY,
47 HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE 47 HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
48
49 HB_OT_SHAPE_ZERO_WIDTH_MARKS_DEFAULT = HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE _LATE
48 }; 50 };
49 51
50 52
51 /* Master OT shaper list */ 53 /* Master OT shaper list */
52 #define HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS \ 54 #define HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS \
53 HB_COMPLEX_SHAPER_IMPLEMENT (default) /* should be first */ \ 55 HB_COMPLEX_SHAPER_IMPLEMENT (default) /* should be first */ \
54 HB_COMPLEX_SHAPER_IMPLEMENT (arabic) \ 56 HB_COMPLEX_SHAPER_IMPLEMENT (arabic) \
57 HB_COMPLEX_SHAPER_IMPLEMENT (hangul) \
58 HB_COMPLEX_SHAPER_IMPLEMENT (hebrew) \
55 HB_COMPLEX_SHAPER_IMPLEMENT (indic) \ 59 HB_COMPLEX_SHAPER_IMPLEMENT (indic) \
56 HB_COMPLEX_SHAPER_IMPLEMENT (myanmar) \ 60 HB_COMPLEX_SHAPER_IMPLEMENT (myanmar) \
57 HB_COMPLEX_SHAPER_IMPLEMENT (sea) \ 61 HB_COMPLEX_SHAPER_IMPLEMENT (sea) \
58 HB_COMPLEX_SHAPER_IMPLEMENT (thai) \ 62 HB_COMPLEX_SHAPER_IMPLEMENT (thai) \
63 HB_COMPLEX_SHAPER_IMPLEMENT (tibetan) \
59 /* ^--- Add new shapers here */ 64 /* ^--- Add new shapers here */
60 65
61 66
62 struct hb_ot_complex_shaper_t 67 struct hb_ot_complex_shaper_t
63 { 68 {
64 char name[8]; 69 char name[8];
65 70
66 /* collect_features() 71 /* collect_features()
67 * Called during shape_plan(). 72 * Called during shape_plan().
68 * Shapers should use plan->map to add their features and callbacks. 73 * Shapers should use plan->map to add their features and callbacks.
(...skipping 29 matching lines...) Expand all
98 /* preprocess_text() 103 /* preprocess_text()
99 * Called during shape(). 104 * Called during shape().
100 * Shapers can use to modify text before shaping starts. 105 * Shapers can use to modify text before shaping starts.
101 * May be NULL. 106 * May be NULL.
102 */ 107 */
103 void (*preprocess_text) (const hb_ot_shape_plan_t *plan, 108 void (*preprocess_text) (const hb_ot_shape_plan_t *plan,
104 hb_buffer_t *buffer, 109 hb_buffer_t *buffer,
105 hb_font_t *font); 110 hb_font_t *font);
106 111
107 112
108 /* normalization_preference() 113 hb_ot_shape_normalization_mode_t normalization_preference;
109 * Called during shape().
110 * May be NULL.
111 */
112 hb_ot_shape_normalization_mode_t
113 (*normalization_preference) (const hb_segment_properties_t *props);
114 114
115 /* decompose() 115 /* decompose()
116 * Called during shape()'s normalization. 116 * Called during shape()'s normalization.
117 * May be NULL. 117 * May be NULL.
118 */ 118 */
119 bool (*decompose) (const hb_ot_shape_normalize_context_t *c, 119 bool (*decompose) (const hb_ot_shape_normalize_context_t *c,
120 hb_codepoint_t ab, 120 hb_codepoint_t ab,
121 hb_codepoint_t *a, 121 hb_codepoint_t *a,
122 hb_codepoint_t *b); 122 hb_codepoint_t *b);
123 123
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 return &_hb_ot_complex_shaper_default; 182 return &_hb_ot_complex_shaper_default;
183 183
184 184
185 /* Unicode-1.1 additions */ 185 /* Unicode-1.1 additions */
186 case HB_SCRIPT_THAI: 186 case HB_SCRIPT_THAI:
187 case HB_SCRIPT_LAO: 187 case HB_SCRIPT_LAO:
188 188
189 return &_hb_ot_complex_shaper_thai; 189 return &_hb_ot_complex_shaper_thai;
190 190
191 191
192 #if 0
193 /* Note:
194 * Currently we don't have a separate Hangul shaper. The default shaper han dles
195 * Hangul by enabling jamo features. We may want to implement a separate sh aper
196 * in the future. See this thread for details of what such a shaper would d o:
197 *
198 * http://lists.freedesktop.org/archives/harfbuzz/2013-April/003070.html
199 */
200 /* Unicode-1.1 additions */ 192 /* Unicode-1.1 additions */
201 case HB_SCRIPT_HANGUL: 193 case HB_SCRIPT_HANGUL:
202 194
203 return &_hb_ot_complex_shaper_hangul; 195 return &_hb_ot_complex_shaper_hangul;
204 #endif 196
197
198 /* Unicode-2.0 additions */
199 case HB_SCRIPT_TIBETAN:
200
201 return &_hb_ot_complex_shaper_tibetan;
202
203
204 /* Unicode-1.1 additions */
205 case HB_SCRIPT_HEBREW:
206
207 return &_hb_ot_complex_shaper_hebrew;
205 208
206 209
207 /* ^--- Add new shapers here */ 210 /* ^--- Add new shapers here */
208 211
209 212
210 #if 0 213 #if 0
211 /* Note: 214 /* Note:
212 * 215 *
213 * These disabled scripts are listed in ucd/IndicSyllabicCategory.txt, but a ccording 216 * These disabled scripts are listed in ucd/IndicSyllabicCategory.txt, but a ccording
214 * to Martin Hosken and Jonathan Kew do not require complex shaping. 217 * to Martin Hosken and Jonathan Kew do not require complex shaping.
(...skipping 19 matching lines...) Expand all
234 case HB_SCRIPT_BRAHMI: 237 case HB_SCRIPT_BRAHMI:
235 238
236 239
237 /* Simple */ 240 /* Simple */
238 241
239 /* Unicode-1.1 additions */ 242 /* Unicode-1.1 additions */
240 /* These have their own shaper now. */ 243 /* These have their own shaper now. */
241 case HB_SCRIPT_LAO: 244 case HB_SCRIPT_LAO:
242 case HB_SCRIPT_THAI: 245 case HB_SCRIPT_THAI:
243 246
244 /* Unicode-2.0 additions */
245 case HB_SCRIPT_TIBETAN:
246
247 /* Unicode-3.2 additions */ 247 /* Unicode-3.2 additions */
248 case HB_SCRIPT_TAGALOG: 248 case HB_SCRIPT_TAGALOG:
249 case HB_SCRIPT_TAGBANWA: 249 case HB_SCRIPT_TAGBANWA:
250 250
251 /* Unicode-4.0 additions */ 251 /* Unicode-4.0 additions */
252 case HB_SCRIPT_LIMBU: 252 case HB_SCRIPT_LIMBU:
253 case HB_SCRIPT_TAI_LE: 253 case HB_SCRIPT_TAI_LE:
254 254
255 /* Unicode-4.1 additions */ 255 /* Unicode-4.1 additions */
256 case HB_SCRIPT_KHAROSHTHI: 256 case HB_SCRIPT_KHAROSHTHI:
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 * GSUB/GPOS needed, so there may be no scripts found! */ 348 * GSUB/GPOS needed, so there may be no scripts found! */
349 if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T')) 349 if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T'))
350 return &_hb_ot_complex_shaper_default; 350 return &_hb_ot_complex_shaper_default;
351 else 351 else
352 return &_hb_ot_complex_shaper_sea; 352 return &_hb_ot_complex_shaper_sea;
353 } 353 }
354 } 354 }
355 355
356 356
357 #endif /* HB_OT_SHAPE_COMPLEX_PRIVATE_HH */ 357 #endif /* HB_OT_SHAPE_COMPLEX_PRIVATE_HH */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698