# the svg files are rendered at a large size and then scaled down.
#
# DEPENDENCIES
-# rsvg-convert (librsvg)
-# convert (imagemagick)
+# rsvg-convert (librsvg 2.39.0)
+# convert (imagemagick 6.8.6-9)
# Xolonium-Regular font
#
# USAGE
if [ "$1" = "--no-font-check" ]; then
shift
else
- if [ -z "$(fc-list ':family=Xolonium:style=Regular')" ]; then
+ if [ -z "$(fc-list ':family=Xolonium GPL:style=Regular')" ]; then
echo "Cannot find the Xolonium-Regular font."
echo "Please install Xolonium before running this script."
exit 2
# Check for arguments
if [ -z "$1" ] || [ -z "$2" ]; then
- echo "Usage: $0 [--no-font-check] DATADIR VERSION"
+ echo "Usage: $0 [--no-font-check] INPUTDIR OUTPUTDIR VERSION"
exit 1
fi
-data="$1"
-version="$2"
+input="$1"
+output="$2"
+version="$3"
svgs="gfx/menu/luma/background_l2.svg
gfx/menu/luma/background_ingame_l2.svg"
for svg in $svgs; do
- dir="$data/${svg%/*}"
- tga="$data/${svg%.*}.tga"
+ dir="$output/${svg%/*}"
+ tga="$output/${svg%.*}.tga"
- mkdir -p "$dir"
- sed "s/LUMA/$version/g" "$svg" | rsvg-convert -z 2 | convert - -scale "50%" "$tga"
+ mkdir -p "$output"
+ sed "s/LUMA/$version/g" "$input/$svg" | rsvg-convert -z 2 | convert - -scale "50%" "$tga"
done