diff options
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh')
-rw-r--r-- | thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh b/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh index 2f99510925..aa4ad4cf3c 100644 --- a/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh +++ b/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh @@ -123,7 +123,7 @@ struct RearrangementSubtable bool reverse_l = 3 == (m >> 4); bool reverse_r = 3 == (m & 0x0F); - if (end - start >= l + r) + if (end - start >= l + r && end-start <= HB_MAX_CONTEXT_LENGTH) { buffer->merge_clusters (start, hb_min (buffer->idx + 1, buffer->len)); buffer->merge_clusters (start, end); @@ -980,6 +980,15 @@ struct Chain setting = HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_SMALL_CAPS; goto retry; } +#ifndef HB_NO_AAT + else if (type == HB_AAT_LAYOUT_FEATURE_TYPE_LANGUAGE_TAG_TYPE && setting && + /* TODO: Rudimentary language matching. */ + hb_language_matches (map->face->table.ltag->get_language (setting - 1), map->props.language)) + { + flags &= feature.disableFlags; + flags |= feature.enableFlags; + } +#endif } } return flags; @@ -1038,12 +1047,12 @@ struct Chain goto skip; if (reverse) - _hb_ot_layout_reverse_graphemes (c->buffer); + c->buffer->reverse (); subtable->apply (c); if (reverse) - _hb_ot_layout_reverse_graphemes (c->buffer); + c->buffer->reverse (); (void) c->buffer->message (c->font, "end chainsubtable %d", c->lookup_index); |