summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hb-ot-shape-complex-indic-private.hh2
-rw-r--r--src/hb-ot-shape-complex-indic.cc8
-rw-r--r--test/shaping/Makefile.am1
-rw-r--r--test/shaping/fonts/sha1sum/54674a3111d209fb6be0ed31745314b7a8d2c244.ttfbin0 -> 1352 bytes
-rw-r--r--test/shaping/tests/indic-syllable.tests1
5 files changed, 11 insertions, 1 deletions
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
--- /dev/null
+++ b/test/shaping/fonts/sha1sum/54674a3111d209fb6be0ed31745314b7a8d2c244.ttf
Binary files 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]