blog/regenerate-dots.sh
Matej Focko 221c46d350
feat: use ‹Hack Nerd Font› as a fallback
Signed-off-by: Matej Focko <mfocko@redhat.com>
2023-07-17 20:03:12 +02:00

13 lines
No EOL
612 B
Bash

#!/bin/sh
FONT="'Iosevka', 'Cascadia Code', 'JetBrains Mono', 'Fira Code', 'Hack Nerd Font', monospace"
for pic in $(find ./static/files -name '*.dot' -print); do
SVG_NAME=".$(echo $pic | cut -d'.' -f2)"
# light mode
dot $pic -Tsvg -Gfontname="$FONT" -Nfontname="$FONT" -Efontname="$FONT" > ${SVG_NAME}_light.svg
# dark mode
dot $pic -Tsvg -Gfontname="$FONT" -Nfontname="$FONT" -Efontname="$FONT" -Gbgcolor="none" -Gcolor="white" -Gfontcolor="white" -Nfillcolor="none" -Ncolor="white" -Nfontcolor="white" -Efillcolor="none" -Ecolor="white" -Efontcolor="white" > ${SVG_NAME}_dark.svg
done;