#!/usr/bin/env bash # Redesenha as tres imagens do The Wizard's Data que traziam texto na fonte "Celtic Bit" (CC BY-ND), com fontes SIL OFL 1.1 # do google/fonts (commit e sha256 abaixo), e grava em wizards-data/gfx/. Precisa de Python 3 com Pillow e do zip original em # artifacts/build/cache (rodar antes o build-wizards-data.sh, que baixa o zip). So e preciso para refazer as imagens; o # build normal usa os PNG ja gravados em gfx/. # # src/FredGames.Bundler/Builds/wizards-data/regen-art.sh [python-com-pillow] set -euo pipefail PY="${1:-python3}" GF=9862abc066c9b83bf84c3e8ed1fc2d8d48f9bbf0 here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" root="$(git -C "$here" rev-parse --show-toplevel)" tmp="$root/artifacts/build/wizards-data-art" rm -rf "$tmp"; mkdir -p "$tmp/fonts" "$tmp/orig" get() { curl -fsSL "https://raw.githubusercontent.com/google/fonts/$GF/ofl/$1" -o "$tmp/fonts/$2"; echo "$3 $tmp/fonts/$2" | shasum -a 256 -c -; } get jacquard24/Jacquard24-Regular.ttf Jacquard24-Regular.ttf 8e5b1bdb8b6087d6175f1d9edd2634e38b10fb109c0955c24ad55272a866ed49 get jacquard12/Jacquard12-Regular.ttf Jacquard12-Regular.ttf b1560583565a37f3d3a25cf2572df3efd2d773ecdcbb459dcd7ea0398cb840d1 get jersey10/Jersey10-Regular.ttf Jersey10-Regular.ttf db9cbd091617048a145d249daa2b815fe7083be6ab66ac26626e21a4e01c3e82 unzip -q -o "$root/artifacts/build/cache/thewizardsdata_pyweek20.zip" 'thewizardsdata_pyweek20/data/gfx/*' -d "$tmp/orig" "$PY" "$here/wd_art.py" "$tmp/orig/thewizardsdata_pyweek20/data/gfx" "$tmp/fonts" "$here/gfx"