From 3c41ccb5358b0be6cc68d49f436d2cb1792cd5e5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 11 Aug 2014 15:11:59 -0400 Subject: [PATCH] [coretext] Use input clusters Before, this shaper was returning UTF-16 cluster indices instead of returning whatever cluster values the user had had set up in the buffer. Ouch! --- src/hb-coretext.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 81d10a45b..498b730c9 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -758,9 +758,7 @@ retry: } info->codepoint = notdef; - /* TODO We have to fixup clusters later. See vis_clusters in - * hb-uniscribe.cc for example. */ - info->cluster = j; + info->cluster = log_clusters[j]; info->mask = advance; info->var1.u32 = 0; @@ -820,7 +818,7 @@ retry: hb_glyph_info_t *info = &buffer->info[buffer->len]; info->codepoint = glyphs[j]; - info->cluster = string_indices[j]; + info->cluster = log_clusters[string_indices[j]]; /* Currently, we do all x-positioning by setting the advance, we never use x-offset. */ info->mask = advance;