Skip to content

Commit ae15baa

Browse files
committed
CI: Install Fira Sans font for consistent PNG snapshot rendering
Add step to download and install Fira Sans font in CI environment to ensure consistent font rendering between local development and GitHub Actions. This fixes the PNG snapshot test failures caused by font fallback differences.
1 parent e5af0e3 commit ae15baa

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,18 @@ jobs:
182182
rm -rf "typst-x86_64-unknown-linux-musl" "typst-x86_64-unknown-linux-musl.tar.xz"
183183
typst --version
184184
185+
- name: Install Fira Sans font
186+
run: |
187+
# Download and install Fira Sans
188+
wget -q "https://github.com/mozilla/Fira/archive/4.202.zip"
189+
unzip -q "4.202.zip"
190+
sudo mkdir -p /usr/local/share/fonts/fira-sans
191+
sudo cp Fira-4.202/otf/FiraSans-*.otf /usr/local/share/fonts/fira-sans/
192+
sudo fc-cache -f -v
193+
rm -rf "4.202.zip" "Fira-4.202"
194+
# Verify font is available
195+
fc-list | grep -i "fira sans" || echo "Fira Sans not found"
196+
185197
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
186198
with:
187199
save-if: ${{ github.ref == 'refs/heads/main' }}

0 commit comments

Comments
 (0)