| Index: third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc
|
| diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc
|
| index 7f8778a8e72681c7f580864f70b2716565d02139..4f6c86e8ee5fa9a77c3874b74c0bb4d734478cd7 100644
|
| --- a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc
|
| +++ b/third_party/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'));
|
|
|
| @@ -193,7 +200,6 @@ collect_features_arabic (hb_ot_shape_planner_t *plan)
|
| map->add_gsub_pause (NULL);
|
|
|
| map->add_global_bool_feature (HB_TAG('c','s','w','h'));
|
| - map->add_global_bool_feature (HB_TAG('d','l','i','g'));
|
| map->add_global_bool_feature (HB_TAG('m','s','e','t'));
|
| }
|
|
|
| @@ -274,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;
|
|
|
| @@ -315,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)
|
|
|