[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.
This commit is contained in:
Behdad Esfahbod 2012-07-29 20:09:22 -04:00
parent 8a7e70ef65
commit a15b70a81a
1 changed files with 3 additions and 9 deletions

View File

@ -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