From 4f04baef17bf5b150c1594f6e80604974e6e95e4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 21 Jan 2022 18:26:54 -0700 Subject: [PATCH] [unsafe-to-concat] Further adjust Arabic joining logic at boundary --- src/hb-ot-shape-complex-arabic.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc index 6c656197e..5eec4af37 100644 --- a/src/hb-ot-shape-complex-arabic.cc +++ b/src/hb-ot-shape-complex-arabic.cc @@ -341,7 +341,14 @@ arabic_joining (hb_buffer_t *buffer) const arabic_state_table_entry *entry = &arabic_state_table[state][this_type]; if (entry->prev_action != NONE && prev != UINT_MAX) + { info[prev].arabic_shaping_action() = entry->prev_action; + buffer->unsafe_to_break (prev, buffer->len); + } + else if (2 <= state && state <= 5) /* States that have a possible prev_action. */ + { + buffer->unsafe_to_concat (prev, buffer->len); + } break; } }