blog/regenerate-dots.sh
Matej Focko a72c71482f
fix: prefer the default font of the web
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-09-06 18:49:18 +02:00

13 lines
609 B
Bash

#!/bin/sh
FONT="'JetBrains Mono', 'Iosevka', 'Cascadia Code PL', 'Fira Code', 'Hack', 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="#1b1b1d" -Gcolor="white" -Gfontcolor="white" -Nfillcolor="none" -Ncolor="white" -Nfontcolor="white" -Efillcolor="none" -Ecolor="white" -Efontcolor="white" > ${SVG_NAME}_dark.svg
done;