提交 30c3d5e9 编写于 作者: B Behdad Esfahbod

[Indic] Simplify Uniscribe cluster emulation

Now that we break syllables on Halant,ZWNJ, this code can be simplified.
上级 decf6ffc
...@@ -1110,18 +1110,11 @@ final_reordering_syllable (hb_buffer_t *buffer, ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册