[hangul] Don't apply 'calt'

See comments.

Micro-test added.
This commit is contained in:
Behdad Esfahbod 2014-07-31 18:51:37 -04:00
parent 8292f96b2b
commit ac53443f1c
7 changed files with 25 additions and 1 deletions

View File

@ -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,

View File

@ -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 \

View File

@ -3,6 +3,8 @@
37033cc5cf37bb223d7355153016b6ccece93b28.ttf
4cce528e99f600ed9c25a2b69e32eb94a03b4ae8.ttf
57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf
757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttf
7e14e7883ed152baa158b80e207b66114c823a8b.ttf
813c2f8e5512187fd982417a7fb4286728e6f4a8.ttf
8454d22037f892e76614e1645d066689a0200e61.ttf
8a9fea2a7384f2116e5b84a9b31f83be7850ce21.ttf

View File

@ -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

View File

@ -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]