Skip to content

Commit 1aff00f

Browse files
committed
CI: use DejaVu fonts (fonts-charis isn't in Ubuntu apt)
The first run failed because the workflow tried to apt-install fonts-charis, which is not in the Ubuntu 24.04 repos (it's named something else in older Debian and was dropped from current). Swap to DejaVu (fonts-dejavu / fonts-dejavu-core) which is always available in Ubuntu apt. DejaVu Serif as body, DejaVu Sans for headings, DejaVu Sans Mono for code blocks. Strip the Numbers=OldStyle font option in CI since DejaVu Serif doesn't have oldstyle figures.
1 parent cbad17c commit 1aff00f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,20 @@ jobs:
6161
- name: Install fonts
6262
run: |
6363
sudo apt-get update -qq
64-
sudo apt-get install -y fonts-charis fonts-dejavu fonts-liberation
64+
sudo apt-get install -y fonts-dejavu fonts-dejavu-core fonts-liberation
6565
fc-cache -f
66+
fc-list | grep -iE 'dejavu|liberation' | head -5
6667
6768
- name: Swap mac fonts for Linux substitutes
6869
# GitHub runners don't have macOS Charter / Helvetica / Menlo.
69-
# Use widely-available substitutes during CI builds only;
70-
# the committed metadata.yaml stays mac-friendly.
70+
# Substitute with DejaVu (ships with fonts-dejavu, always
71+
# available); the committed metadata.yaml stays mac-friendly.
7172
run: |
7273
sed -i \
73-
-e 's/^mainfont:.*/mainfont: "Charis SIL"/' \
74+
-e 's/^mainfont:.*/mainfont: "DejaVu Serif"/' \
7475
-e 's/^sansfont:.*/sansfont: "DejaVu Sans"/' \
7576
-e 's/^monofont:.*/monofont: "DejaVu Sans Mono"/' \
77+
-e '/^mainfontoptions:/,/^[^ ]/{/Numbers=OldStyle/d}' \
7678
metadata.yaml
7779
grep -E '^(mainfont|sansfont|monofont):' metadata.yaml
7880

0 commit comments

Comments
 (0)