[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Fri Jul 14 14:55:27 UTC 2017
src/hb-ot-shape-complex-indic-private.hh | 2 +-
src/hb-ot-shape-complex-indic.cc | 8 ++++++++
test/shaping/Makefile.am | 1 +
test/shaping/fonts/sha1sum/54674a3111d209fb6be0ed31745314b7a8d2c244.ttf |binary
test/shaping/tests/indic-syllable.tests | 1 +
5 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 3cc84f45b995b243fca82ce18481f11d69846eb5
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jul 14 15:50:22 2017 +0100
[indic] Fix https://github.com/behdad/harfbuzz/issues/478
diff --git a/src/hb-ot-shape-complex-indic-private.hh b/src/hb-ot-shape-complex-indic-private.hh
index 5879c3e4..58be4222 100644
--- a/src/hb-ot-shape-complex-indic-private.hh
+++ b/src/hb-ot-shape-complex-indic-private.hh
@@ -132,7 +132,7 @@ enum indic_syllabic_category_t {
INDIC_SYLLABIC_CATEGORY_NUMBER_JOINER = OT_PLACEHOLDER, /* Don't care. */
INDIC_SYLLABIC_CATEGORY_PURE_KILLER = OT_M, /* Is like a vowel matra. */
INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_RS,
- INDIC_SYLLABIC_CATEGORY_SYLLABLE_MODIFIER = OT_M, /* Misc Khmer signs. */
+ INDIC_SYLLABIC_CATEGORY_SYLLABLE_MODIFIER = OT_SM,
INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X,
INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_N,
INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H,
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 8227a77d..97cec38e 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -200,6 +200,14 @@ set_indic_properties (hb_glyph_info_t &info)
cat = OT_Symbol;
ASSERT_STATIC ((int) INDIC_SYLLABIC_CATEGORY_AVAGRAHA == OT_Symbol);
}
+ else if (unlikely (hb_in_range (u, 0x17CDu, 0x17D1u) ||
+ u == 0x17CBu || u == 0x17D3u || u == 0x17DDu)) /* Khmer Various signs */
+ {
+ /* These can occur mid-syllable (eg. before matras), even though Unicode marks them as Syllable_Modifier. */
+ cat = OT_M;
+ pos = POS_ABOVE_C;
+ }
+
else if (unlikely (u == 0x17C6u)) cat = OT_N; /* Khmer Bindu doesn't like to be repositioned. */
else if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x2010u, 0x2011u)))
cat = OT_PLACEHOLDER;
diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
index f84b4671..48569f0b 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
@@ -59,6 +59,7 @@ TESTS = \
tests/indic-joiners.tests \
tests/indic-old-spec.tests \
tests/indic-pref-blocking.tests \
+ tests/indic-syllable.tests \
tests/language-tags.tests \
tests/ligature-id.tests \
tests/mark-filtering-sets.tests \
diff --git a/test/shaping/fonts/sha1sum/54674a3111d209fb6be0ed31745314b7a8d2c244.ttf b/test/shaping/fonts/sha1sum/54674a3111d209fb6be0ed31745314b7a8d2c244.ttf
new file mode 100644
index 00000000..837e8d2c
Binary files /dev/null and b/test/shaping/fonts/sha1sum/54674a3111d209fb6be0ed31745314b7a8d2c244.ttf differ
diff --git a/test/shaping/tests/indic-syllable.tests b/test/shaping/tests/indic-syllable.tests
new file mode 100644
index 00000000..26c38b35
--- /dev/null
+++ b/test/shaping/tests/indic-syllable.tests
@@ -0,0 +1 @@
+fonts/sha1sum/54674a3111d209fb6be0ed31745314b7a8d2c244.ttf::U+0BA4,U+0BCD,U+00B3:[taprehalftamil=0+1509|uni00B3=2+674]
More information about the HarfBuzz
mailing list