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.
14 # Xolonium-Regular font
17 # ./render-version.sh [--no-font-check] DATADIR VERSION
20 # Check for Xolonium font
21 if [ "$1" = "--no-font-check" ]; then
24 if [ -z "$(fc-list ':family=Xolonium:style=Regular')" ]; then
25 echo "Cannot find the Xolonium-Regular font."
26 echo "Please install Xolonium before running this script."
33 if [ -z "$1" ] || [ -z "$2" ]; then
34 echo "Usage: $0 [--no-font-check] DATADIR VERSION"
41 layers="gfx/menu/luminos/background_l2.svg
42 gfx/menu/luminos/background_ingame_l2.svg"
45 for svg in $layers; do
47 tga="$data/${svg%.*}.tga"
50 sed "s/LUMINOS/$version/g" "$svg" | rsvg-convert -z 2 |\
51 convert - -scale "50%" -gaussian-blur "4x0.7" "$tga"