summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-01-24 19:41:33 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-01-25 08:41:05 +0100
commit3de9bc9cb1dc96ea803e6190de9b6fb6fe00e307 (patch)
treeb0754571e5efd71440ecdbd6bea9f1f7c82b6d3e /src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc
parent3c1e16df757888988498a92146ac35ceba83dabf (diff)
Update bundled HarfBuzz-NG to 0.9.38
Most important changes: * Fixes for Arabic, Hangul, Hebrew, Indic, Mandaic, Myanmar, and New Tai Lue shapers. * Fixed out-of-bounds access in Indic shaper. * Build and stability fixes, various optimizations. Change-Id: I4f0e32c017f62fe576bee41a430d3da6d571de80 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.cc44
1 files changed, 21 insertions, 23 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 9870ba3da0..ae90864127 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
@@ -223,8 +223,8 @@ data_create_arabic (const hb_ot_shape_plan_t *plan)
for (unsigned int i = 0; i < ARABIC_NUM_FEATURES; i++) {
arabic_plan->mask_array[i] = plan->map.get_1_mask (arabic_features[i]);
arabic_plan->do_fallback = arabic_plan->do_fallback &&
- !FEATURE_IS_SYRIAC (arabic_features[i]) &&
- plan->map.needs_fallback (arabic_features[i]);
+ (FEATURE_IS_SYRIAC (arabic_features[i]) ||
+ plan->map.needs_fallback (arabic_features[i]));
}
return arabic_plan;
@@ -248,18 +248,17 @@ arabic_joining (hb_buffer_t *buffer)
unsigned int prev = (unsigned int) -1, state = 0;
/* Check pre-context */
- if (!(buffer->flags & HB_BUFFER_FLAG_BOT))
- for (unsigned int i = 0; i < buffer->context_len[0]; i++)
- {
- unsigned int this_type = get_joining_type (buffer->context[0][i], buffer->unicode->general_category (buffer->context[0][i]));
+ for (unsigned int i = 0; i < buffer->context_len[0]; i++)
+ {
+ unsigned int this_type = get_joining_type (buffer->context[0][i], buffer->unicode->general_category (buffer->context[0][i]));
- if (unlikely (this_type == JOINING_TYPE_T))
- continue;
+ if (unlikely (this_type == JOINING_TYPE_T))
+ continue;
- const arabic_state_table_entry *entry = &arabic_state_table[state][this_type];
- state = entry->next_state;
- break;
- }
+ const arabic_state_table_entry *entry = &arabic_state_table[state][this_type];
+ state = entry->next_state;
+ break;
+ }
for (unsigned int i = 0; i < count; i++)
{
@@ -281,19 +280,18 @@ arabic_joining (hb_buffer_t *buffer)
state = entry->next_state;
}
- if (!(buffer->flags & HB_BUFFER_FLAG_EOT))
- for (unsigned int i = 0; i < buffer->context_len[1]; i++)
- {
- unsigned int this_type = get_joining_type (buffer->context[1][i], buffer->unicode->general_category (buffer->context[1][i]));
+ for (unsigned int i = 0; i < buffer->context_len[1]; i++)
+ {
+ unsigned int this_type = get_joining_type (buffer->context[1][i], buffer->unicode->general_category (buffer->context[1][i]));
- if (unlikely (this_type == JOINING_TYPE_T))
- continue;
+ if (unlikely (this_type == JOINING_TYPE_T))
+ continue;
- const arabic_state_table_entry *entry = &arabic_state_table[state][this_type];
- if (entry->prev_action != NONE && prev != (unsigned int) -1)
- info[prev].arabic_shaping_action() = entry->prev_action;
- break;
- }
+ const arabic_state_table_entry *entry = &arabic_state_table[state][this_type];
+ if (entry->prev_action != NONE && prev != (unsigned int) -1)
+ info[prev].arabic_shaping_action() = entry->prev_action;
+ break;
+ }
}
static void