Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc

Issue 70193010: Update harfbuzz-ng to 0.9.24 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-shape.cc ('k') | third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698