File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,11 +3,17 @@ set -euo pipefail
33
44mkdir -p _site
55
6+ # Use .fonts directory if present (CI downloads Fira fonts there)
7+ font_args=()
8+ if [ -d .fonts ]; then
9+ font_args=(--font-path .fonts)
10+ fi
11+
612# Compile each gallery demo and generate a thumbnail
713for src in gallery/* .typ; do
814 name=$( basename " $src " .typ)
915 echo " Compiling $name ..."
10- typst compile --root . " $src " " _site/${name} .pdf"
16+ typst compile --root . " ${font_args[@]} " " $ src" " _site/${name} .pdf"
1117 pdftoppm -png -singlefile -r 150 " _site/${name} .pdf" " _site/${name} "
1218done
1319
Original file line number Diff line number Diff line change 3434 - name : Install system dependencies
3535 run : |
3636 sudo apt-get update
37- sudo apt-get install -y poppler-utils fonts-fira-sans
37+ sudo apt-get install -y poppler-utils
38+
39+ - name : Download Fira fonts
40+ run : |
41+ mkdir -p .fonts
42+ curl -sL "https://fonts.google.com/download?family=Fira+Sans" -o /tmp/fira-sans.zip
43+ curl -sL "https://fonts.google.com/download?family=Fira+Mono" -o /tmp/fira-mono.zip
44+ unzip -qo /tmp/fira-sans.zip -d .fonts/
45+ unzip -qo /tmp/fira-mono.zip -d .fonts/
3846
3947 - name : Build gallery
4048 run : |
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ CLAUDE.local.md
99
1010# GitHub Pages build output
1111_site /
12+ .fonts /
1213
1314# OS files
1415.DS_Store
You can’t perform that action at this time.
0 commit comments