summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2012-05-11 16:23:43 +0200
committerBehdad Esfahbod <behdad@behdad.org>2012-05-11 16:23:43 +0200
commit6782bdae3be0357da1dadc7b806a43ceefa67a90 (patch)
tree831b8db6a00a465edae754d51bdc0601df1624f6 /src
parent3c2ea9481b1028e927e615a5434ebf8edcb5f891 (diff)
[Indic] Fix Left Matra + Halant reordering
As can be seen in: U+092B,U+093F,U+094D
Diffstat (limited to 'src')
-rw-r--r--src/hb-ot-shape-complex-indic.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 99c22683..f22f762b 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -500,8 +500,10 @@ final_reordering_syllable (hb_buffer_t *buffer,
while (new_matra_pos > start &&
!(FLAG (info[new_matra_pos].indic_category()) & (FLAG (OT_M) | FLAG (OT_H))))
new_matra_pos--;
- /* If we found no Halant we are done. Otherwise... */
- if (info[new_matra_pos].indic_category() == OT_H) {
+ /* If we found no Halant we are done. Otherwise only proceed if the Halant does
+ * not belong to the Matra itself! */
+ if (info[new_matra_pos].indic_category() == OT_H &&
+ info[new_matra_pos].indic_position() != POS_LEFT_MATRA) {
/* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */
if (new_matra_pos + 1 < end && is_joiner (info[new_matra_pos + 1]))
new_matra_pos++;