BUILD.md | 2 - src/hb-ot-shape-complex-indic.cc | 15 ++++++++++ test/shaping/Makefile.am | 1 test/shaping/fonts/sha1sum/3cae6bfe5b57c07ba81ddbd54c02fe4f3a1e3bf6.ttf |binary test/shaping/tests/indic-special-cases.tests | 3 ++ 5 files changed, 20 insertions(+), 1 deletion(-)
New commits: commit fa48ccbe127a2e61ab316f3638e4056940964dae Author: Behdad Esfahbod <[email protected]> Date: Thu Oct 12 14:07:37 2017 +0200 [indic] Special-case Kannada Ra,H,ZWJ sequence Fixes https://github.com/behdad/harfbuzz/issues/435 diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 31dc1c0e..e520f38f 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -691,6 +691,21 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, const indic_shape_plan_t *indic_plan = (const indic_shape_plan_t *) plan->data; hb_glyph_info_t *info = buffer->info; + /* https://github.com/behdad/harfbuzz/issues/435#issuecomment-335560167 + * // For compatibility with legacy useage in Kannada, + * // Ra+h+ZWJ must behave like Ra+ZWJ+h... + */ + if (buffer->props.script == HB_SCRIPT_KANNADA && + start + 3 <= end && + is_one_of (info[start ], FLAG (OT_Ra)) && + is_one_of (info[start+1], FLAG (OT_H)) && + is_one_of (info[start+2], FLAG (OT_ZWJ))) + { + buffer->merge_clusters (start+1, start+3); + hb_glyph_info_t tmp = info[start+1]; + info[start+1] = info[start+2]; + info[start+2] = tmp; + } /* 1. Find base consonant: * diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am index ecb836db..f788d42b 100644 --- a/test/shaping/Makefile.am +++ b/test/shaping/Makefile.am @@ -61,6 +61,7 @@ TESTS = \ tests/indic-joiners.tests \ tests/indic-old-spec.tests \ tests/indic-pref-blocking.tests \ + tests/indic-special-cases.tests \ tests/indic-syllable.tests \ tests/language-tags.tests \ tests/ligature-id.tests \ diff --git a/test/shaping/fonts/sha1sum/3cae6bfe5b57c07ba81ddbd54c02fe4f3a1e3bf6.ttf b/test/shaping/fonts/sha1sum/3cae6bfe5b57c07ba81ddbd54c02fe4f3a1e3bf6.ttf new file mode 100644 index 00000000..2cacb681 Binary files /dev/null and b/test/shaping/fonts/sha1sum/3cae6bfe5b57c07ba81ddbd54c02fe4f3a1e3bf6.ttf differ diff --git a/test/shaping/tests/indic-special-cases.tests b/test/shaping/tests/indic-special-cases.tests new file mode 100644 index 00000000..d45ee8c4 --- /dev/null +++ b/test/shaping/tests/indic-special-cases.tests @@ -0,0 +1,3 @@ +fonts/sha1sum/3cae6bfe5b57c07ba81ddbd54c02fe4f3a1e3bf6.ttf::U+0CB0,U+0CCD,U+0C95:[gid1=0+1176|gid5=0+1161] +fonts/sha1sum/3cae6bfe5b57c07ba81ddbd54c02fe4f3a1e3bf6.ttf::U+0CB0,U+200D,U+0CCD,U+0C95:[gid2=0+1334|gid6=0+358] +fonts/sha1sum/3cae6bfe5b57c07ba81ddbd54c02fe4f3a1e3bf6.ttf::U+0CB0,U+0CCD,U+200D,U+0C95:[gid2=0+1334|gid6=0+358] commit 6bac4ac2bebb612debecc8ec10b845e977c0afe1 Author: ebraminio <[email protected]> Date: Thu Oct 12 15:15:49 2017 +0330 Minor BUILD.md fix (#565) diff --git a/BUILD.md b/BUILD.md index 370c997a..2107803a 100644 --- a/BUILD.md +++ b/BUILD.md @@ -9,7 +9,7 @@ on Windows, consider using [vcpkg](https://github.com/Microsoft/vcpkg), provided by Microsoft, for building HarfBuzz and other open-source libraries but if you need to build harfbuzz from source, put ragel binary on your PATH and follow appveyor CI's cmake -[https://github.com/behdad/harfbuzz/blob/master/appveyor.yml](build steps). +[build steps](https://github.com/behdad/harfbuzz/blob/master/appveyor.yml). on macOS, using MacPorts: * sudo port install freetype glib2 cairo _______________________________________________ HarfBuzz mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/harfbuzz
