From 5b31fe383ead726ec77062501ed3bb24c02842b3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 1 Sep 2015 16:24:34 +0100 Subject: [PATCH] [use] Merge /before/ reordering --- src/hb-ot-shape-complex-use.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-shape-complex-use.cc b/src/hb-ot-shape-complex-use.cc index 41eb43ffb..4b15deedd 100644 --- a/src/hb-ot-shape-complex-use.cc +++ b/src/hb-ot-shape-complex-use.cc @@ -436,10 +436,10 @@ reorder_syllable (hb_buffer_t *buffer, unsigned int start, unsigned int end) if (info[i].use_category() == USE_H) i--; + buffer->merge_clusters (start, i + 1); hb_glyph_info_t t = info[start]; memmove (&info[start], &info[start + 1], (i - start) * sizeof (info[0])); info[i] = t; - buffer->merge_clusters (start, i + 1); break; } @@ -464,10 +464,10 @@ reorder_syllable (hb_buffer_t *buffer, unsigned int start, unsigned int end) 0 == _hb_glyph_info_get_lig_comp (&info[i]) && j < i) { + buffer->merge_clusters (j, i + 1); hb_glyph_info_t t = info[i]; memmove (&info[j + 1], &info[j], (i - j) * sizeof (info[0])); info[j] = t; - buffer->merge_clusters (j, i + 1); } } }