提交 f22b7e77 编写于 作者: B Behdad Esfahbod

[Indic] Track base position when reordering things

Ouch, how did things ever work without this?!  The added test that has a
dot-reph as well as a pre-base reordering Ra perfectly demonstrates the
bug (tested with Nirmala font from Win8 for example).  Testing suggests
that Win8 shaper has the *exact* same bug / behavior that we used to
have.  Odd.
上级 bc11de14
......@@ -1237,6 +1237,8 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
hb_glyph_info_t tmp = info[old_pos];
memmove (&info[old_pos], &info[old_pos + 1], (new_pos - old_pos) * sizeof (info[0]));
info[new_pos] = tmp;
if (old_pos < base && base <= new_pos) /* Shouldn't actually happen. */
base--;
new_pos--;
}
buffer->merge_clusters (new_pos, MIN (end, base + 1));
......@@ -1389,6 +1391,8 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
hb_glyph_info_t reph = info[start];
memmove (&info[start], &info[start + 1], (new_reph_pos - start) * sizeof (info[0]));
info[new_reph_pos] = reph;
if (start < base && base <= new_reph_pos)
base--;
}
}
......@@ -1454,6 +1458,8 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
hb_glyph_info_t tmp = info[old_pos];
memmove (&info[new_pos + 1], &info[new_pos], (old_pos - new_pos) * sizeof (info[0]));
info[new_pos] = tmp;
if (new_pos <= base && base < old_pos)
base++;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册