[hangul] Don't apply 'calt'
See comments.
Micro-test added.
diff --git a/src/hb-ot-shape-complex-hangul.cc b/src/hb-ot-shape-complex-hangul.cc
index 54c12eb..6ac18b0 100644
--- a/src/hb-ot-shape-complex-hangul.cc
+++ b/src/hb-ot-shape-complex-hangul.cc
@@ -59,6 +59,15 @@
map->add_feature (hangul_features[i], 1, F_NONE);
}
+static void
+override_features_hangul (hb_ot_shape_planner_t *plan)
+{
+ /* Uniscribe does not apply 'calt' for Hangul, and certain fonts
+ * (Noto Sans CJK, Source Sans Han, etc) apply all of jamo lookups
+ * in calt, which is not desirable. */
+ plan->map.add_feature (HB_TAG('c','a','l','t'), 0, F_GLOBAL);
+}
+
struct hangul_shape_plan_t
{
ASSERT_POD ();
@@ -404,7 +413,7 @@
{
"hangul",
collect_features_hangul,
- NULL, /* override_features */
+ override_features_hangul,
data_create_hangul, /* data_create */
data_destroy_hangul, /* data_destroy */
preprocess_text_hangul,
diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
index f40f2ff..9e82513 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
@@ -38,6 +38,7 @@
TESTS = \
tests/arabic-feature-order.tests \
tests/context-matching.tests \
+ tests/hangul-jamo.tests \
tests/indic-old-spec.tests \
tests/indic-pref-blocking.tests \
tests/mongolian-variation-selector.tests \
diff --git a/test/shaping/fonts/sha1sum/757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttf b/test/shaping/fonts/sha1sum/757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttf
new file mode 100644
index 0000000..bbe2237
--- /dev/null
+++ b/test/shaping/fonts/sha1sum/757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttf
Binary files differ
diff --git a/test/shaping/fonts/sha1sum/7e14e7883ed152baa158b80e207b66114c823a8b.ttf b/test/shaping/fonts/sha1sum/7e14e7883ed152baa158b80e207b66114c823a8b.ttf
new file mode 100644
index 0000000..27efd7c
--- /dev/null
+++ b/test/shaping/fonts/sha1sum/7e14e7883ed152baa158b80e207b66114c823a8b.ttf
Binary files differ
diff --git a/test/shaping/fonts/sha1sum/MANIFEST b/test/shaping/fonts/sha1sum/MANIFEST
index fe359b1..a8ca117 100644
--- a/test/shaping/fonts/sha1sum/MANIFEST
+++ b/test/shaping/fonts/sha1sum/MANIFEST
@@ -3,6 +3,8 @@
37033cc5cf37bb223d7355153016b6ccece93b28.ttf
4cce528e99f600ed9c25a2b69e32eb94a03b4ae8.ttf
57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf
+757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttf
+7e14e7883ed152baa158b80e207b66114c823a8b.ttf
813c2f8e5512187fd982417a7fb4286728e6f4a8.ttf
8454d22037f892e76614e1645d066689a0200e61.ttf
8a9fea2a7384f2116e5b84a9b31f83be7850ce21.ttf
diff --git a/test/shaping/tests/MANIFEST b/test/shaping/tests/MANIFEST
index 8c2bdca..3639133 100644
--- a/test/shaping/tests/MANIFEST
+++ b/test/shaping/tests/MANIFEST
@@ -1,5 +1,6 @@
arabic-feature-order.tests
context-matching.tests
+hangul-jamo.tests
indic-old-spec.tests
indic-pref-blocking.tests
mongolian-variation-selector.tests
diff --git a/test/shaping/tests/hangul-jamo.tests b/test/shaping/tests/hangul-jamo.tests
new file mode 100644
index 0000000..7c1ef6b
--- /dev/null
+++ b/test/shaping/tests/hangul-jamo.tests
@@ -0,0 +1,11 @@
+[gid64252=0+920|gid64568=0+0]
+[gid3=0+920|gid4=0+0]
+win/util/hb-view.exe --viewr uniscribe
+[gid64252=0+920|gid64568=0+0]
+[gid3=0+920|gid4=0+0]
+win/util/hb-shape.exe --shaper uniscribe
+win/util/hb-view.exe --viewr uniscribe
+[gid64252=0+920|gid64568=0+0]
+[gid3=0+920|gid4=0+0]
+fonts/sha1sum/757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttf:U+115F,U+11A2:[gid3=0+920|gid4=0+0]
+fonts/sha1sum/7e14e7883ed152baa158b80e207b66114c823a8b.ttf:U+11A2:[gid1=0+920]