[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sun Oct 27 15:28:25 PDT 2013
src/hb-ot-shape-complex-indic.cc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 46a863d91dbcc9a4c796e3715ea3828939f4d941
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Oct 27 23:24:50 2013 +0100
[indic] Adjust pref reordering logic
For Javanese (pref_len == 1) only reorder if it didn't ligate. That's
sensible, and what the spec says. For other Indic (pref_len > 1)
only reorder if ligated.
Doesn't change any test numbers.
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 8265a58..dace8f7 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -1551,6 +1551,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
if (indic_plan->mask_array[PREF] && base + 1 < end) /* Otherwise there can't be any pre-base reordering Ra. */
{
+ unsigned int pref_len = indic_plan->config->pref_len;
for (unsigned int i = base + 1; i < end; i++)
if ((info[i].mask & indic_plan->mask_array[PREF]) != 0)
{
@@ -1559,8 +1560,12 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
* the feature generally but block it in certain contexts.)
*/
/* Note: We just check that something got substituted. We don't check that
- * the <pref> feature actually did it... */
- if (_hb_glyph_info_substituted (&info[i]))
+ * the <pref> feature actually did it...
+ *
+ * If pref len is longer than one, then only reorder if it ligated. If
+ * pref len is one, only reorder if it didn't ligate with other things. */
+ if (_hb_glyph_info_substituted (&info[i]) &&
+ ((pref_len == 1) ^ _hb_glyph_info_ligated (&info[i])))
{
/*
* 2. Try to find a target position the same way as for pre-base matra.
More information about the HarfBuzz
mailing list