From 330a2af3ff0e12c01b3b451357b8bdc83b2e9b47 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 8 Jun 2012 20:40:02 -0400 Subject: [PATCH] Use merge_clusters when forming Unicode clusters --- src/hb-ot-shape.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 3a13bb59c..60b028d34 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -188,7 +188,7 @@ hb_form_clusters (hb_buffer_t *buffer) (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK))) - buffer->info[i].cluster = buffer->info[i - 1].cluster; /* XXX do the min() here */ + buffer->merge_clusters (i - 1, i + 1); } static void @@ -405,6 +405,8 @@ hb_ot_shape_execute_internal (hb_ot_shape_context_t *c) HB_BUFFER_ALLOCATE_VAR (c->buffer, unicode_props0); HB_BUFFER_ALLOCATE_VAR (c->buffer, unicode_props1); + c->buffer->clear_output (); + hb_set_unicode_props (c->buffer); hb_form_clusters (c->buffer);