[HarfBuzz] harfbuzz: Branch 'master' - 2 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Mon Jun 4 22:43:12 UTC 2018
src/hb-ot-shape-complex-indic.cc | 2 -
test/shaping/data/in-house/Makefile.sources | 1
test/shaping/data/in-house/fonts/5af5361ed4d1e8305780b100e1730cb09132f8d1.ttf |binary
test/shaping/data/in-house/tests/sinhala.tests | 1
test/shaping/record-test.sh | 11 ++++++++--
5 files changed, 12 insertions(+), 3 deletions(-)
New commits:
commit 4a115fe7fe71e381decb7c894208540663419f75
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Jun 4 15:40:43 2018 -0700
[sinhala] Move reph to after post-consonants
Apparently this changed between Win 7 and Win 10.
Fixes https://github.com/harfbuzz/harfbuzz/issues/967
To be continued in https://github.com/harfbuzz/harfbuzz/issues/1044
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index f08876b8..447e36cc 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -86,7 +86,7 @@ static const indic_config_t indic_configs[] =
{HB_SCRIPT_KANNADA, true, 0x0CCDu,BASE_POS_LAST, REPH_POS_AFTER_POST, REPH_MODE_IMPLICIT, BLWF_MODE_POST_ONLY},
{HB_SCRIPT_MALAYALAM, true, 0x0D4Du,BASE_POS_LAST, REPH_POS_AFTER_MAIN, REPH_MODE_LOG_REPHA,BLWF_MODE_PRE_AND_POST},
{HB_SCRIPT_SINHALA, false,0x0DCAu,BASE_POS_LAST_SINHALA,
- REPH_POS_AFTER_MAIN, REPH_MODE_EXPLICIT, BLWF_MODE_PRE_AND_POST},
+ REPH_POS_AFTER_POST, REPH_MODE_EXPLICIT, BLWF_MODE_PRE_AND_POST},
};
diff --git a/test/shaping/data/in-house/Makefile.sources b/test/shaping/data/in-house/Makefile.sources
index bf4df201..ef16faed 100644
--- a/test/shaping/data/in-house/Makefile.sources
+++ b/test/shaping/data/in-house/Makefile.sources
@@ -34,6 +34,7 @@ TESTS = \
tests/none-directional.tests \
tests/spaces.tests \
tests/simple.tests \
+ tests/sinhala.tests \
tests/tibetan-contractions-1.tests \
tests/tibetan-contractions-2.tests \
tests/tibetan-vowels.tests \
diff --git a/test/shaping/data/in-house/fonts/5af5361ed4d1e8305780b100e1730cb09132f8d1.ttf b/test/shaping/data/in-house/fonts/5af5361ed4d1e8305780b100e1730cb09132f8d1.ttf
new file mode 100644
index 00000000..72c5244a
Binary files /dev/null and b/test/shaping/data/in-house/fonts/5af5361ed4d1e8305780b100e1730cb09132f8d1.ttf differ
diff --git a/test/shaping/data/in-house/tests/sinhala.tests b/test/shaping/data/in-house/tests/sinhala.tests
new file mode 100644
index 00000000..9541754d
--- /dev/null
+++ b/test/shaping/data/in-house/tests/sinhala.tests
@@ -0,0 +1 @@
+../fonts/5af5361ed4d1e8305780b100e1730cb09132f8d1.ttf::U+0DBB,U+0DCA,U+200D,U+0DBA,U+0DCA,U+200D,U+0DBA:[gid8=0+1343|gid4=0+1130]
commit 3e494caae3dc096339a46d5a3fdeb5a718de6911
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Jun 4 15:38:05 2018 -0700
[test] Fix record-test to use gids not glyph-names
as those might not match what FontTools think of the glyphs if font
does NOT have glyph names.
diff --git a/test/shaping/record-test.sh b/test/shaping/record-test.sh
index f31d30ba..93ebcfc9 100755
--- a/test/shaping/record-test.sh
+++ b/test/shaping/record-test.sh
@@ -46,15 +46,22 @@ if test $? != 0; then
echo "hb-shape failed." >&2
exit 2
fi
-glyph_names=`echo "$text" | $hb_shape $options --no-clusters --no-positions "$fontfile" | sed 's/[][]//g; s/|/,/g'`
+glyph_ids=`echo "$text" | $hb_shape $options --no-glyph-names --no-clusters --no-positions "$fontfile" | sed 's/[][]//g; s/|/,/g'`
cp "$fontfile" "$dir/font.ttf"
+echo fonttools subset \
+ --glyph-names \
+ --no-hinting \
+ --layout-features='*' \
+ "$dir/font.ttf" \
+ --gids="$glyph_ids" \
+ --text="$text"
fonttools subset \
--glyph-names \
--no-hinting \
--layout-features='*' \
"$dir/font.ttf" \
- --glyphs="$glyph_names" \
+ --gids="$glyph_ids" \
--text="$text"
if ! test -s "$dir/font.subset.ttf"; then
echo "Subsetter didn't produce nonempty subset font in $dir/font.subset.ttf" >&2
More information about the HarfBuzz
mailing list