From 8ab0affbee9c61c38a455b0d9c51bf2c01cc93b5 Mon Sep 17 00:00:00 2001 From: Ryan L McIntyre Date: Fri, 21 Apr 2017 19:13:56 -0400 Subject: [PATCH] WIP of semi-automated glyph visual testing * allow a quick visual inspection of powerlines and glyphs --- bin/scripts/tests.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bin/scripts/tests.sh diff --git a/bin/scripts/tests.sh b/bin/scripts/tests.sh new file mode 100755 index 000000000..1dd6f46a8 --- /dev/null +++ b/bin/scripts/tests.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +clear +echo "Click to start" + +# Window geometry +# source: https://www.maketecheasier.com/record-screen-as-animated-gif-ubuntu/ +XWININFO=$(xwininfo) +read X < <(awk -F: '/Absolute upper-left X/{print $2}' <<< "$XWININFO") +read Y < <(awk -F: '/Absolute upper-left Y/{print $2}' <<< "$XWININFO") +read W < <(awk -F: '/Width/{print $2}' <<< "$XWININFO") +read H < <(awk -F: '/Height/{print $2}' <<< "$XWININFO") + +byzanz-record -c --exec=./test-fonts.sh --x=$X --y=$Y --width=$W --height=$H "rec3.gif" + +convert -coalesce "rec3.gif" "results/nerd-fonts.png" +convert -append $(ls -v results/*.png) ./test-combined.png +