Skip to content

Commit 8c5ca02

Browse files
committed
Install Hasklug font into macOS font dir before PDF build
Tectonic on macOS uses Core Text, which only scans ~/Library/Fonts/ and the system font dirs — it can't see fonts provided via Nix's /nix/store. Copy the Hasklug Nerd Font files into ~/Library/Fonts/ on the CI runner before invoking the PDF build so fontspec can resolve 'Hasklug Nerd Font Mono'.
1 parent fc19568 commit 8c5ca02

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/build-artifacts.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ jobs:
3333
- name: Check Nix Flake
3434
run: nix flake check
3535

36+
- name: Make Hasklug font visible to tectonic
37+
run: |
38+
# nix develop realizes all dev-shell inputs into /nix/store
39+
nix develop --command true
40+
mkdir -p ~/Library/Fonts
41+
for dir in /nix/store/*-nerd-fonts-hasklug-*/share/fonts; do
42+
[ -d "$dir" ] || continue
43+
find "$dir" -type f \( -name "*.otf" -o -name "*.ttf" \) \
44+
-exec cp -n {} ~/Library/Fonts/ \;
45+
done
46+
echo "Installed fonts:"
47+
ls ~/Library/Fonts/ | grep -i hasklug | head
48+
3649
- name: Build Anki deck and PDF with Nix
3750
run: |
3851
nix develop --command bash -c \

0 commit comments

Comments
 (0)