| Index: third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh
|
| diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh b/third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh
|
| index 38c2c6405a32efd1f156d63488eebd2d6eb0c843..7de56cf2a2bbe6af77c6a9c7bc002d96f2dae738 100644
|
| --- a/third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh
|
| +++ b/third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh
|
| @@ -1288,10 +1288,28 @@ GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer)
|
|
|
| const GDEF &gdef = *hb_ot_layout_from_face (font->face)->gdef;
|
| unsigned int count = buffer->len;
|
| + hb_glyph_info_t *info = buffer->info;
|
| for (unsigned int i = 0; i < count; i++)
|
| {
|
| - _hb_glyph_info_set_glyph_props (&buffer->info[i], gdef.get_glyph_props (buffer->info[i].codepoint));
|
| - _hb_glyph_info_clear_lig_props (&buffer->info[i]);
|
| + unsigned int props = gdef.get_glyph_props (info[i].codepoint);
|
| + if (!props)
|
| + {
|
| + /* Never mark default-ignorables as marks.
|
| + * They won't get in the way of lookups anyway,
|
| + * but having them as mark will cause them to be skipped
|
| + * over if the lookup-flag says so, but at least for the
|
| + * Mongolian variation selectors, looks like Uniscribe
|
| + * marks them as non-mark. Some Mongolian fonts without
|
| + * GDEF rely on this. Another notable character that
|
| + * this applies to is COMBINING GRAPHEME JOINER. */
|
| + props = (_hb_glyph_info_get_general_category (&info[i]) !=
|
| + HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK ||
|
| + _hb_glyph_info_is_default_ignorable (&info[i])) ?
|
| + HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH :
|
| + HB_OT_LAYOUT_GLYPH_PROPS_MARK;
|
| + }
|
| + _hb_glyph_info_set_glyph_props (&info[i], props);
|
| + _hb_glyph_info_clear_lig_props (&info[i]);
|
| buffer->info[i].syllable() = 0;
|
| }
|
| }
|
|
|