From 3d68517c382b76a263f9cfd2f4e6141019acf4c2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 6 Feb 2025 22:25:22 +0000 Subject: [PATCH] [hb-draw-compare] Spoonfeed svgo --- test/draw/hb-draw-compare | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/draw/hb-draw-compare b/test/draw/hb-draw-compare index afa2d53aa..0b08dd871 100755 --- a/test/draw/hb-draw-compare +++ b/test/draw/hb-draw-compare @@ -67,12 +67,16 @@ for backend in $BACKEND0 $BACKEND1; do done echo "Optimizing SVGs..." >&2 -$SVGO --quiet --precision 0 --folder "$dir" +# svgo doesn't seem to handle too many files at once, even with --folder. Spoonfeed it. +ls "$dir"/*.svg | +xargs -n 1000 \ +$SVGO --quiet --precision 0 echo "Diffing SVGs..." >&2 for unicode in $unicodes; do numchars=$((numchars+1)) if cmp --quiet "$dir/$unicode.$BACKEND0.svg" "$dir/$unicode.$BACKEND1.svg"; then + echo "Charater $unicode is the same." >&2 continue fi