3 # Render menu background layers with VERSION string
6 # It is necessary to have the Xolonium font installed on the system,
7 # because svg rendering tools cannot handle embedded or linked fonts.
8 # To compensate for filter rendering errors and to reduce rbg noise,
9 # the svg files are rendered at a large size and then scaled down.
12 # rsvg-convert (librsvg 2.39.0)
13 # convert (imagemagick 6.8.6-9)
14 # Xolonium-Regular font
17 # ./render-version.sh [--no-font-check] DATADIR VERSION
20 # ./render-version.sh ~/.xonotic/data "1.0"
23 # Check for Xolonium font
24 if [ "$1" = "--no-font-check" ]; then
27 if [ -z "$(fc-list ':family=Xolonium GPL:style=Regular')" ]; then
28 echo "Cannot find the Xolonium-Regular font."
29 echo "Please install Xolonium before running this script."
36 if [ -z "$1" ] || [ -z "$2" ]; then
37 echo "Usage: $0 [--no-font-check] DATADIR VERSION"
44 svgs="gfx/menu/luma/background_l2.svg
45 gfx/menu/luma/background_ingame_l2.svg"
50 tga="$data/${svg%.*}.tga"
53 sed "s/LUMA/$version/g" "$svg" | rsvg-convert -z 2 | convert - -scale "50%" "$tga"