summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2014-07-31 18:51:37 -0400
committerBehdad Esfahbod <behdad@behdad.org>2014-07-31 18:54:43 -0400
commitac53443f1cea83ed43a4e41a9fdb91902f7fae7b (patch)
tree4313cd9d2513971e8874b431cb9dc751c52413f9
parent8292f96b2be173ebceb1b54426c271cfeaecd633 (diff)
downloadharfbuzz-ac53443f1cea83ed43a4e41a9fdb91902f7fae7b.tar.gz
[hangul] Don't apply 'calt'
See comments. Micro-test added.
-rw-r--r--src/hb-ot-shape-complex-hangul.cc11
-rw-r--r--test/shaping/Makefile.am1
-rw-r--r--test/shaping/fonts/sha1sum/757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttfbin0 -> 1804 bytes
-rw-r--r--test/shaping/fonts/sha1sum/7e14e7883ed152baa158b80e207b66114c823a8b.ttfbin0 -> 1644 bytes
-rw-r--r--test/shaping/fonts/sha1sum/MANIFEST2
-rw-r--r--test/shaping/tests/MANIFEST1
-rw-r--r--test/shaping/tests/hangul-jamo.tests11
7 files changed, 25 insertions, 1 deletions
diff --git a/src/hb-ot-shape-complex-hangul.cc b/src/hb-ot-shape-complex-hangul.cc
index 54c12ebc..6ac18b08 100644
--- a/src/hb-ot-shape-complex-hangul.cc
+++ b/src/hb-ot-shape-complex-hangul.cc
@@ -59,6 +59,15 @@ collect_features_hangul (hb_ot_shape_planner_t *plan)
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 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hangul =
{
"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 f40f2fff..9e825133 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
@@ -38,6 +38,7 @@ CLEANFILES += \
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 00000000..bbe22370
--- /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 00000000..27efd7c9
--- /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 fe359b1a..a8ca117f 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 8c2bdca1..36391333 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 00000000..7c1ef6bf
--- /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]