Include all relevant glyphs in the subsetted font

This commit is contained in:
David Corbett 2017-10-26 10:29:28 -04:00 committed by Behdad Esfahbod
parent cb6c6b0c42
commit 729c9e1335
1 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,7 @@ 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'`
cp "$fontfile" "$dir/font.ttf"
fonttools subset \
@ -48,6 +49,7 @@ fonttools subset \
--no-hinting \
--layout-features='*' \
"$dir/font.ttf" \
--glyphs="$glyph_names" \
--text="$text"
if ! test -s "$dir/font.subset.ttf"; then
echo "Subsetter didn't produce nonempty subset font in $dir/font.subset.ttf" >&2