From 235c3a129581e96701fe055341e56699766df5fa Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 21 Jan 2022 15:17:40 -0700 Subject: [PATCH] [unsafe-to-concat] Adjust Arabic joining logic Test failures done one more. Fixed the mongolian-variation-selector test. Another test case: $ util/hb-shape NotoSansArabic-Regular.ttf -u 628,200c,628 --show-flags --verify --- src/hb-ot-shape-complex-arabic.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc index 222c5d6b7..6c656197e 100644 --- a/src/hb-ot-shape-complex-arabic.cc +++ b/src/hb-ot-shape-complex-arabic.cc @@ -321,6 +321,10 @@ arabic_joining (hb_buffer_t *buffer) info[prev].arabic_shaping_action() = entry->prev_action; buffer->unsafe_to_break (prev, i + 1); } + else if (2 <= state && state <= 5) /* States that have a possible prev_action. */ + { + buffer->unsafe_to_concat (prev, i + 1); + } info[i].arabic_shaping_action() = entry->curr_action;