From a15b70a81a609f024083cb04f9819483f4d5cab7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 29 Jul 2012 20:09:22 -0400 Subject: [PATCH] [hb-old] Fix cluster formation in RTL Unlike Uniscribe, hb-old returns glyphs in logical order, so the logic does not need to duplicated for RTL. --- src/hb-old.cc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/hb-old.cc b/src/hb-old.cc index f938a9b25..5285b7f15 100644 --- a/src/hb-old.cc +++ b/src/hb-old.cc @@ -345,15 +345,9 @@ retry: uint32_t *p = &vis_clusters[item.log_clusters[buffer->info[i].utf16_index()]]; *p = MIN (*p, buffer->info[i].cluster); } - if (!backward) { - for (unsigned int i = 1; i < num_glyphs; i++) - if (vis_clusters[i] == -1) - vis_clusters[i] = vis_clusters[i - 1]; - } else { - for (int i = num_glyphs - 2; i >= 0; i--) - if (vis_clusters[i] == -1) - vis_clusters[i] = vis_clusters[i + 1]; - } + for (unsigned int i = 1; i < num_glyphs; i++) + if (vis_clusters[i] == -1) + vis_clusters[i] = vis_clusters[i - 1]; #undef utf16_index