File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
.scripts/generate_feature_graphic Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2929 - name : Install requirements
3030 run : |
3131 sudo apt-get update
32- sudo apt-get install imagemagick mat2 optipng
32+ sudo apt-get install inkscape mat2 optipng xvfb
3333 # Install 200 weight versions of relevant Noto (to use for languages not supported by Lexend Deca)
3434 sudo apt-get install fonts-noto-extra fonts-noto-cjk-extra
3535 # Custom fonts
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ for lang in "$script_location/../../fastlane/metadata/android/"*; do
3737 # We specifically need the Serif version because of the 200 weight
3838 case " $( basename " $lang " ) " in
3939 bg|el-GR|ru-RU|uk) sed -i " s/Lexend Deca/Noto Serif/" featureGraphic.svg ;;
40+ fa-IR) sed -i -e ' s/svg direction="ltr"/svg direction="rtl"/' -e " s/Yesteryear/Noto Sans Arabic/" -e " s/Lexend Deca/Noto Sans Arabic/" featureGraphic.svg ;;
4041 hi-IN) sed -i -e " s/Yesteryear/Noto Sans Devanagari/" -e " s/Lexend Deca/Noto Serif Devanagari/" featureGraphic.svg ;;
4142 ja-JP) sed -i " s/Lexend Deca/Noto Serif CJK JP/" featureGraphic.svg ;;
4243 kn-IN) sed -i -e ' s/font-size="150"/font-size="100"/' -e " s/Yesteryear/Noto Serif Kannada/" featureGraphic.svg ;;
@@ -48,8 +49,8 @@ for lang in "$script_location/../../fastlane/metadata/android/"*; do
4849 fi
4950 # Ensure images directory exists
5051 mkdir -p images
51- # Generate .png
52- convert featureGraphic.svg images/featureGraphic.png
52+ # Generate .png (we use Inkscape because ImageMagick ignores RTL)
53+ xvfb-run inkscape --export-filename= images/featureGraphic.png featureGraphic.svg
5354 # Optimize .png
5455 optipng images/featureGraphic.png
5556 # Remove metadata (timestamps) from .png
You can’t perform that action at this time.
0 commit comments