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

Side by Side Diff: third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh

Issue 1723043002: Roll HarfBuzz to 1.2.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include upstream ebd7431f824 Created 4 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 © 2007,2008,2009,2010 Red Hat, Inc. 2 * Copyright © 2007,2008,2009,2010 Red Hat, Inc.
3 * Copyright © 2010,2012,2013 Google, Inc. 3 * Copyright © 2010,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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 */ 1261 */
1262 1262
1263 struct GSUB : GSUBGPOS 1263 struct GSUB : GSUBGPOS
1264 { 1264 {
1265 static const hb_tag_t tableTag = HB_OT_TAG_GSUB; 1265 static const hb_tag_t tableTag = HB_OT_TAG_GSUB;
1266 1266
1267 inline const SubstLookup& get_lookup (unsigned int i) const 1267 inline const SubstLookup& get_lookup (unsigned int i) const
1268 { return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); } 1268 { return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); }
1269 1269
1270 static inline void substitute_start (hb_font_t *font, hb_buffer_t *buffer); 1270 static inline void substitute_start (hb_font_t *font, hb_buffer_t *buffer);
1271 static inline void substitute_finish (hb_font_t *font, hb_buffer_t *buffer);
1272 1271
1273 inline bool sanitize (hb_sanitize_context_t *c) const 1272 inline bool sanitize (hb_sanitize_context_t *c) const
1274 { 1273 {
1275 TRACE_SANITIZE (this); 1274 TRACE_SANITIZE (this);
1276 if (unlikely (!GSUBGPOS::sanitize (c))) return_trace (false); 1275 if (unlikely (!GSUBGPOS::sanitize (c))) return_trace (false);
1277 const OffsetTo<SubstLookupList> &list = CastR<OffsetTo<SubstLookupList> > (l ookupList); 1276 const OffsetTo<SubstLookupList> &list = CastR<OffsetTo<SubstLookupList> > (l ookupList);
1278 return_trace (list.sanitize (c, this)); 1277 return_trace (list.sanitize (c, this));
1279 } 1278 }
1280 public: 1279 public:
1281 DEFINE_SIZE_STATIC (10); 1280 DEFINE_SIZE_STATIC (10);
1282 }; 1281 };
1283 1282
1284 1283
1285 void 1284 void
1286 GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer) 1285 GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer)
1287 { 1286 {
1288 _hb_buffer_assert_gsubgpos_vars (buffer); 1287 _hb_buffer_assert_gsubgpos_vars (buffer);
1289 1288
1290 const GDEF &gdef = *hb_ot_layout_from_face (font->face)->gdef; 1289 const GDEF &gdef = *hb_ot_layout_from_face (font->face)->gdef;
1291 unsigned int count = buffer->len; 1290 unsigned int count = buffer->len;
1292 for (unsigned int i = 0; i < count; i++) 1291 for (unsigned int i = 0; i < count; i++)
1293 { 1292 {
1294 _hb_glyph_info_set_glyph_props (&buffer->info[i], gdef.get_glyph_props (buff er->info[i].codepoint)); 1293 _hb_glyph_info_set_glyph_props (&buffer->info[i], gdef.get_glyph_props (buff er->info[i].codepoint));
1295 _hb_glyph_info_clear_lig_props (&buffer->info[i]); 1294 _hb_glyph_info_clear_lig_props (&buffer->info[i]);
1296 buffer->info[i].syllable() = 0; 1295 buffer->info[i].syllable() = 0;
1297 } 1296 }
1298 } 1297 }
1299 1298
1300 void
1301 GSUB::substitute_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer HB_UNUSE D)
1302 {
1303 }
1304
1305 1299
1306 /* Out-of-class implementation for methods recursing */ 1300 /* Out-of-class implementation for methods recursing */
1307 1301
1308 /*static*/ inline bool ExtensionSubst::is_reverse (void) const 1302 /*static*/ inline bool ExtensionSubst::is_reverse (void) const
1309 { 1303 {
1310 unsigned int type = get_type (); 1304 unsigned int type = get_type ();
1311 if (unlikely (type == SubstLookupSubTable::Extension)) 1305 if (unlikely (type == SubstLookupSubTable::Extension))
1312 return CastR<ExtensionSubst> (get_subtable<LookupSubTable>()).is_reverse (); 1306 return CastR<ExtensionSubst> (get_subtable<LookupSubTable>()).is_reverse ();
1313 return SubstLookup::lookup_type_is_reverse (type); 1307 return SubstLookup::lookup_type_is_reverse (type);
1314 } 1308 }
(...skipping 18 matching lines...) Expand all
1333 c->set_lookup_index (saved_lookup_index); 1327 c->set_lookup_index (saved_lookup_index);
1334 c->set_lookup_props (saved_lookup_props); 1328 c->set_lookup_props (saved_lookup_props);
1335 return ret; 1329 return ret;
1336 } 1330 }
1337 1331
1338 1332
1339 } /* namespace OT */ 1333 } /* namespace OT */
1340 1334
1341 1335
1342 #endif /* HB_OT_LAYOUT_GSUB_TABLE_HH */ 1336 #endif /* HB_OT_LAYOUT_GSUB_TABLE_HH */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh ('k') | third_party/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698