[Indic] Simplify Uniscribe cluster emulation

Now that we break syllables on Halant,ZWNJ, this code can be simplified.
This commit is contained in:
Behdad Esfahbod 2012-07-20 13:56:32 -04:00
parent decf6ffca4
commit 30c3d5e9fc
1 changed files with 2 additions and 9 deletions

View File

@ -1110,18 +1110,11 @@ final_reordering_syllable (hb_buffer_t *buffer,
if (indic_options ().uniscribe_bug_compatible) if (indic_options ().uniscribe_bug_compatible)
{ {
/* This is what Uniscribe does. Ie. add cluster boundaries after Halant,ZWNJ. /* Uniscribe merges the entire cluster.
* This means, half forms are submerged into the main consonants cluster. * This means, half forms are submerged into the main consonants cluster.
* This is unnecessary, and makes cursor positioning harder, but that's what * This is unnecessary, and makes cursor positioning harder, but that's what
* Uniscribe does. */ * Uniscribe does. */
unsigned int cluster_start = start; start_of_last_cluster = start;
for (unsigned int i = start + 1; i < start_of_last_cluster; i++)
if (is_halant_or_coeng (info[i - 1]) && info[i].indic_category() == OT_ZWNJ) {
i++;
buffer->merge_clusters (cluster_start, i);
cluster_start = i;
}
start_of_last_cluster = cluster_start;
} }
buffer->merge_clusters (start_of_last_cluster, end); buffer->merge_clusters (start_of_last_cluster, end);