| OLD | NEW |
| 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 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 }; | 1281 }; |
| 1282 | 1282 |
| 1283 | 1283 |
| 1284 void | 1284 void |
| 1285 GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer) | 1285 GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer) |
| 1286 { | 1286 { |
| 1287 _hb_buffer_assert_gsubgpos_vars (buffer); | 1287 _hb_buffer_assert_gsubgpos_vars (buffer); |
| 1288 | 1288 |
| 1289 const GDEF &gdef = *hb_ot_layout_from_face (font->face)->gdef; | 1289 const GDEF &gdef = *hb_ot_layout_from_face (font->face)->gdef; |
| 1290 unsigned int count = buffer->len; | 1290 unsigned int count = buffer->len; |
| 1291 hb_glyph_info_t *info = buffer->info; |
| 1291 for (unsigned int i = 0; i < count; i++) | 1292 for (unsigned int i = 0; i < count; i++) |
| 1292 { | 1293 { |
| 1293 _hb_glyph_info_set_glyph_props (&buffer->info[i], gdef.get_glyph_props (buff
er->info[i].codepoint)); | 1294 unsigned int props = gdef.get_glyph_props (info[i].codepoint); |
| 1294 _hb_glyph_info_clear_lig_props (&buffer->info[i]); | 1295 if (!props) |
| 1296 { |
| 1297 /* Never mark default-ignorables as marks. |
| 1298 * They won't get in the way of lookups anyway, |
| 1299 * but having them as mark will cause them to be skipped |
| 1300 * over if the lookup-flag says so, but at least for the |
| 1301 * Mongolian variation selectors, looks like Uniscribe |
| 1302 * marks them as non-mark. Some Mongolian fonts without |
| 1303 * GDEF rely on this. Another notable character that |
| 1304 * this applies to is COMBINING GRAPHEME JOINER. */ |
| 1305 props = (_hb_glyph_info_get_general_category (&info[i]) != |
| 1306 » HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK || |
| 1307 » _hb_glyph_info_is_default_ignorable (&info[i])) ? |
| 1308 » HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH : |
| 1309 » HB_OT_LAYOUT_GLYPH_PROPS_MARK; |
| 1310 } |
| 1311 _hb_glyph_info_set_glyph_props (&info[i], props); |
| 1312 _hb_glyph_info_clear_lig_props (&info[i]); |
| 1295 buffer->info[i].syllable() = 0; | 1313 buffer->info[i].syllable() = 0; |
| 1296 } | 1314 } |
| 1297 } | 1315 } |
| 1298 | 1316 |
| 1299 | 1317 |
| 1300 /* Out-of-class implementation for methods recursing */ | 1318 /* Out-of-class implementation for methods recursing */ |
| 1301 | 1319 |
| 1302 /*static*/ inline bool ExtensionSubst::is_reverse (void) const | 1320 /*static*/ inline bool ExtensionSubst::is_reverse (void) const |
| 1303 { | 1321 { |
| 1304 unsigned int type = get_type (); | 1322 unsigned int type = get_type (); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1327 c->set_lookup_index (saved_lookup_index); | 1345 c->set_lookup_index (saved_lookup_index); |
| 1328 c->set_lookup_props (saved_lookup_props); | 1346 c->set_lookup_props (saved_lookup_props); |
| 1329 return ret; | 1347 return ret; |
| 1330 } | 1348 } |
| 1331 | 1349 |
| 1332 | 1350 |
| 1333 } /* namespace OT */ | 1351 } /* namespace OT */ |
| 1334 | 1352 |
| 1335 | 1353 |
| 1336 #endif /* HB_OT_LAYOUT_GSUB_TABLE_HH */ | 1354 #endif /* HB_OT_LAYOUT_GSUB_TABLE_HH */ |
| OLD | NEW |