From 62c2711121fe78f373c15c0f53090b62b52d11c1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 22 Feb 2016 15:07:20 +0900 Subject: [PATCH] [coretext] Limit grapheme-cluster forming to cluster-level=0 --- src/hb-coretext.cc | 1 + src/hb-ot-shape.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 90b163f6..8c18fdf8 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -491,6 +491,7 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, * B1 M1 B2 M2, and B1-B2 form a ligature, M2's cluster will * continue pointing to B2 even though B2 was merged into B1's * cluster... */ + if (buffer->cluster_level == HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES) { hb_unicode_funcs_t *unicode = buffer->unicode; unsigned int count = buffer->len; diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 0b023289..44653d57 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -267,7 +267,7 @@ hb_form_clusters (hb_buffer_t *buffer) buffer->cluster_level != HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES) return; - /* Loop duplicated in hb_ensure_native_direction(). */ + /* Loop duplicated in hb_ensure_native_direction(), and in _hb-coretext.cc */ unsigned int base = 0; unsigned int count = buffer->len; hb_glyph_info_t *info = buffer->info; -- GitLab