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

Side by Side Diff: third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc

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
OLDNEW
1 /* 1 /*
2 * Copyright © 2010,2012 Google, Inc. 2 * Copyright © 2010,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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 *ab = 0xFB2Du; 147 *ab = 0xFB2Du;
148 found = true; 148 found = true;
149 } 149 }
150 break; 150 break;
151 } 151 }
152 } 152 }
153 153
154 return found; 154 return found;
155 } 155 }
156 156
157 static bool
158 disable_otl_hebrew (const hb_ot_shape_plan_t *plan)
159 {
160 /* For Hebrew shaper, use fallback if GPOS does not have 'hebr'
161 * script. This matches Uniscribe better, and makes fonts like
162 * Arial that have GSUB/GPOS/GDEF but no data for Hebrew work.
163 * See:
164 * https://github.com/behdad/harfbuzz/issues/347#issuecomment-267838368
165 */
166 return plan->map.chosen_script[1] != HB_TAG ('h','e','b','r');
167 }
168
157 169
158 const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hebrew = 170 const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hebrew =
159 { 171 {
160 "hebrew", 172 "hebrew",
161 NULL, /* collect_features */ 173 NULL, /* collect_features */
162 NULL, /* override_features */ 174 NULL, /* override_features */
163 NULL, /* data_create */ 175 NULL, /* data_create */
164 NULL, /* data_destroy */ 176 NULL, /* data_destroy */
165 NULL, /* preprocess_text */ 177 NULL, /* preprocess_text */
166 NULL, /* postprocess_glyphs */ 178 NULL, /* postprocess_glyphs */
167 HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT, 179 HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
168 NULL, /* decompose */ 180 NULL, /* decompose */
169 compose_hebrew, 181 compose_hebrew,
170 NULL, /* setup_masks */ 182 NULL, /* setup_masks */
183 disable_otl_hebrew,
171 HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE, 184 HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
172 true, /* fallback_position */ 185 true, /* fallback_position */
173 }; 186 };
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc ('k') | third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698