diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2013-12-16 08:49:48 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-19 05:49:27 +0100 |
commit | 260fe985255c46fd2eb0aff378da8dccb5f2703f (patch) | |
tree | 11691b16243276c1b88c23d470cdb48e5f3fa1a2 /src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc | |
parent | 4b2c73b4767bcb512cbc17f65186eac5d004db07 (diff) |
Update bundled HarfBuzz sources up to 0.9.25
Most important changes:
- Myanmar, Indic, Javanese / Buginese shaper improvements
- More aggressive shape-plan caching
- Additional OpenType language tags
Change-Id: I54ed62cfe936c06c18589d09ac119a0f5881a235
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc index a57e81a5ec..4f6c86e8ee 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc @@ -157,6 +157,11 @@ static const struct arabic_state_table_entry { static void +nuke_joiners (const hb_ot_shape_plan_t *plan, + hb_font_t *font, + hb_buffer_t *buffer); + +static void arabic_fallback_shape (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer); @@ -176,6 +181,8 @@ collect_features_arabic (hb_ot_shape_planner_t *plan) * TODO: Add test cases for these two. */ + map->add_gsub_pause (nuke_joiners); + map->add_global_bool_feature (HB_TAG('c','c','m','p')); map->add_global_bool_feature (HB_TAG('l','o','c','l')); @@ -273,7 +280,8 @@ arabic_joining (hb_buffer_t *buffer) const arabic_state_table_entry *entry = &arabic_state_table[state][this_type]; if (entry->prev_action != NONE && prev != (unsigned int) -1) - buffer->info[prev].arabic_shaping_action() = entry->prev_action; + for (; prev < i; prev++) + buffer->info[prev].arabic_shaping_action() = entry->prev_action; buffer->info[i].arabic_shaping_action() = entry->curr_action; @@ -314,6 +322,17 @@ setup_masks_arabic (const hb_ot_shape_plan_t *plan, static void +nuke_joiners (const hb_ot_shape_plan_t *plan HB_UNUSED, + hb_font_t *font HB_UNUSED, + hb_buffer_t *buffer) +{ + unsigned int count = buffer->len; + for (unsigned int i = 0; i < count; i++) + if (_hb_glyph_info_is_zwj (&buffer->info[i])) + _hb_glyph_info_flip_joiners (&buffer->info[i]); +} + +static void arabic_fallback_shape (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) |