src/hb-ot-shape-complex-arabic-fallback.hh | 1 src/hb-ot-shape-complex-hangul.cc | 11 +++++++++- test/shaping/Makefile.am | 1 test/shaping/fonts/sha1sum/757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttf |binary test/shaping/fonts/sha1sum/7e14e7883ed152baa158b80e207b66114c823a8b.ttf |binary test/shaping/fonts/sha1sum/MANIFEST | 2 + test/shaping/record-test.sh | 2 - test/shaping/tests/MANIFEST | 1 test/shaping/tests/hangul-jamo.tests | 11 ++++++++++ 9 files changed, 27 insertions(+), 2 deletions(-)
New commits: commit ac53443f1cea83ed43a4e41a9fdb91902f7fae7b Author: Behdad Esfahbod <[email protected]> Date: Thu Jul 31 18:51:37 2014 -0400 [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 @@ 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 f40f2ff..9e82513 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 0000000..bbe2237 Binary files /dev/null and b/test/shaping/fonts/sha1sum/757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttf differ diff --git a/test/shaping/fonts/sha1sum/7e14e7883ed152baa158b80e207b66114c823a8b.ttf b/test/shaping/fonts/sha1sum/7e14e7883ed152baa158b80e207b66114c823a8b.ttf new file mode 100644 index 0000000..27efd7c Binary files /dev/null and b/test/shaping/fonts/sha1sum/7e14e7883ed152baa158b80e207b66114c823a8b.ttf 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] commit 8292f96b2be173ebceb1b54426c271cfeaecd633 Author: Behdad Esfahbod <[email protected]> Date: Thu Jul 31 18:33:11 2014 -0400 [test] Fix record-test.sh diff --git a/test/shaping/record-test.sh b/test/shaping/record-test.sh index 81087f7..a69157f 100755 --- a/test/shaping/record-test.sh +++ b/test/shaping/record-test.sh @@ -27,7 +27,7 @@ glyphs_subset=`echo "$text" | $hb_shape "$dir/font.ttf.subset"` if ! test "x$glyphs" = "x$glyphs_subset"; then echo "Subset font produced different glyphs!" >&2 echo "Perhaps font doesn't have glyph names; checking visually..." >&2 - hb_view=${hb_shape//shape/view} + hb_view=${hb_shape/shape/view} echo "$text" | $hb_view "$dir/font.ttf" --output-format=png --output-file="$dir/orig.png" echo "$text" | $hb_view "$dir/font.ttf.subset" --output-format=png --output-file="$dir/subset.png" if ! cmp "$dir/orig.png" "$dir/subset.png"; then commit 88911e8cc765c26e502503a3a00ac7f17973f3d9 Author: Behdad Esfahbod <[email protected]> Date: Tue Jul 29 19:47:26 2014 -0400 Minor diff --git a/src/hb-ot-shape-complex-arabic-fallback.hh b/src/hb-ot-shape-complex-arabic-fallback.hh index 2d8488e..d488885 100644 --- a/src/hb-ot-shape-complex-arabic-fallback.hh +++ b/src/hb-ot-shape-complex-arabic-fallback.hh @@ -33,6 +33,7 @@ #include "hb-ot-layout-gsub-table.hh" +/* Features ordered the same as the entries in shaping_table rows. */ static const hb_tag_t arabic_fallback_features[] = { HB_TAG('i','n','i','t'), _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
