[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.
This commit is contained in:
parent
58400a2ad8
commit
3e494caae3
|
@ -46,15 +46,22 @@ if test $? != 0; then
|
||||||
echo "hb-shape failed." >&2
|
echo "hb-shape failed." >&2
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
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"
|
cp "$fontfile" "$dir/font.ttf"
|
||||||
|
echo fonttools subset \
|
||||||
|
--glyph-names \
|
||||||
|
--no-hinting \
|
||||||
|
--layout-features='*' \
|
||||||
|
"$dir/font.ttf" \
|
||||||
|
--gids="$glyph_ids" \
|
||||||
|
--text="$text"
|
||||||
fonttools subset \
|
fonttools subset \
|
||||||
--glyph-names \
|
--glyph-names \
|
||||||
--no-hinting \
|
--no-hinting \
|
||||||
--layout-features='*' \
|
--layout-features='*' \
|
||||||
"$dir/font.ttf" \
|
"$dir/font.ttf" \
|
||||||
--glyphs="$glyph_names" \
|
--gids="$glyph_ids" \
|
||||||
--text="$text"
|
--text="$text"
|
||||||
if ! test -s "$dir/font.subset.ttf"; then
|
if ! test -s "$dir/font.subset.ttf"; then
|
||||||
echo "Subsetter didn't produce nonempty subset font in $dir/font.subset.ttf" >&2
|
echo "Subsetter didn't produce nonempty subset font in $dir/font.subset.ttf" >&2
|
||||||
|
|
Loading…
Reference in New Issue