提交 8b3c7f9e 编写于 作者: B Behdad Esfahbod

[test] Support recording multiple lines of text in record-test.sh

上级 85658394
...@@ -35,7 +35,7 @@ done ...@@ -35,7 +35,7 @@ done
if ! $have_text; then if ! $have_text; then
text=`cat` text=`cat`
fi fi
unicodes=`./hb-unicode-decode "$text"` unicodes=`echo "$text" | ./hb-unicode-decode`
glyphs=`echo "$text" | $hb_shape $options "$fontfile"` glyphs=`echo "$text" | $hb_shape $options "$fontfile"`
if test $? != 0; then if test $? != 0; then
echo "hb-shape failed." >&2 echo "hb-shape failed." >&2
...@@ -77,7 +77,18 @@ sha1sum=`sha1sum "$dir/font.ttf.subset" | cut -d' ' -f1` ...@@ -77,7 +77,18 @@ sha1sum=`sha1sum "$dir/font.ttf.subset" | cut -d' ' -f1`
subset="fonts/sha1sum/$sha1sum.ttf" subset="fonts/sha1sum/$sha1sum.ttf"
mv "$dir/font.ttf.subset" "$subset" mv "$dir/font.ttf.subset" "$subset"
echo "$subset:$options:$unicodes:$glyphs" # There ought to be an easier way to do this, but it escapes me...
unicodes_file=`mktemp`
glyphs_file=`mktemp`
echo "$unicodes" > "$unicodes_file"
echo "$glyphs" > "$glyphs_file"
# Open the "file"s
exec 3<"$unicodes_file"
exec 4<"$glyphs_file"
while read uline <&3 && read gline <&4; do
echo "$subset:$options:$uline:$gline"
done
rm -f "$dir/font.ttf" rm -f "$dir/font.ttf"
rmdir "$dir" rmdir "$dir"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册