Skip to content

Commit 073c6df

Browse files
Merge pull request #2432 from CatimaLoyalty/fix/persian_feature_graphic
Fix Persian feature graphic generation
2 parents 43add95 + 0fa4a6a commit 073c6df

File tree

48 files changed

+6
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+6
-5
lines changed

.github/workflows/generate-feature-graphic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
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

.scripts/generate_feature_graphic/featureGraphic.svg

Lines changed: 2 additions & 2 deletions

.scripts/generate_feature_graphic/generate_feature_graphic.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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
-17.6 KB
-17.6 KB
-17.5 KB
-15.9 KB
-17.6 KB
-19.2 KB
-18.8 KB

0 commit comments

Comments
 (0)