diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2015-01-24 19:41:33 +0400 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2015-01-25 08:41:05 +0100 |
commit | 3de9bc9cb1dc96ea803e6190de9b6fb6fe00e307 (patch) | |
tree | b0754571e5efd71440ecdbd6bea9f1f7c82b6d3e /src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc | |
parent | 3c1e16df757888988498a92146ac35ceba83dabf (diff) |
Update bundled HarfBuzz-NG to 0.9.38
Most important changes:
* Fixes for Arabic, Hangul, Hebrew, Indic,
Mandaic, Myanmar, and New Tai Lue shapers.
* Fixed out-of-bounds access in Indic shaper.
* Build and stability fixes, various optimizations.
Change-Id: I4f0e32c017f62fe576bee41a430d3da6d571de80
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc index 33215a304f..7723600410 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc @@ -921,14 +921,32 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, info[start].indic_position() = POS_RA_TO_BECOME_REPH; /* For old-style Indic script tags, move the first post-base Halant after - * last consonant. Only do this if there is *not* a Halant after last - * consonant. Otherwise it becomes messy. */ - if (indic_plan->is_old_spec) { + * last consonant. + * + * Reports suggest that in some scripts Uniscribe does this only if there + * is *not* a Halant after last consonant already (eg. Kannada), while it + * does it unconditionally in other scripts (eg. Malayalam). We don't + * currently know about other scripts, so we single out Malayalam for now. + * + * Kannada test case: + * U+0C9A,U+0CCD,U+0C9A,U+0CCD + * With some versions of Lohit Kannada. + * https://bugs.freedesktop.org/show_bug.cgi?id=59118 + * + * Malayalam test case: + * U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D + * With lohit-ttf-20121122/Lohit-Malayalam.ttf + */ + if (indic_plan->is_old_spec) + { + bool disallow_double_halants = buffer->props.script != HB_SCRIPT_MALAYALAM; for (unsigned int i = base + 1; i < end; i++) - if (info[i].indic_category() == OT_H) { + if (info[i].indic_category() == OT_H) + { unsigned int j; for (j = end - 1; j > i; j--) - if (is_consonant (info[j]) || info[j].indic_category() == OT_H) + if (is_consonant (info[j]) || + (disallow_double_halants && info[j].indic_category() == OT_H)) break; if (info[j].indic_category() != OT_H && j > i) { /* Move Halant to after last consonant. */ @@ -1267,6 +1285,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED, info.cluster = buffer->cur().cluster; info.mask = buffer->cur().mask; info.syllable() = buffer->cur().syllable(); + /* TODO Set glyph_props? */ /* Insert dottedcircle after possible Repha. */ while (buffer->idx < buffer->len && |