[hangul] Merge /before/ reordering
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 1 Sep 2015 15:24:13 +0000 (16:24 +0100)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 1 Sep 2015 15:24:13 +0000 (16:24 +0100)
src/hb-ot-shape-complex-hangul.cc

index 763dbf0..1fa79ce 100644 (file)
@@ -205,11 +205,11 @@ preprocess_text_hangul (const hb_ot_shape_plan_t *plan,
        buffer->next_glyph ();
        if (!is_zero_width_char (font, u))
        {
+         buffer->merge_out_clusters (start, end + 1);
          hb_glyph_info_t *info = buffer->out_info;
          hb_glyph_info_t tone = info[end];
          memmove (&info[start + 1], &info[start], (end - start) * sizeof (hb_glyph_info_t));
          info[start] = tone;
-         buffer->merge_out_clusters (start, end + 1);
        }
       }
       else