Skip to content

Commit

Permalink
ci: Opt for installing font in SILE container instead of host
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Sep 26, 2024
1 parent cd3650c commit 0e8e364
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/fontship.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Setup prerequisites
run: sudo apt-get -qq install fonts-texgyre
- name: Fontship make
uses: theleagueof/fontship@v0
# Work around fontship v0.10.0 an below trying to force install-dist on first pass
Expand All @@ -30,11 +28,9 @@ jobs:
args: documentation/waterfalls.sil -o documentation/waterfalls.pdf
- name: SILE
id: sile
run: |
docker run -t -v "/usr/share/texmf/fonts/opentype/public/tex-gyre/:/fonts" ghcr.io/sile-typesetter/sile:v0 -- documentation/sample.sil
# uses: sile-typesetter/sile@v0
# with:
# args: documentation/sample.sil
uses: sile-typesetter/sile@v0
with:
args: --version; pacman --noconfirm -Sq tex-gyre-fonts; sile documentation/sample.sil
- name: Fontship package
id: fontship
uses: theleagueof/fontship@v0
Expand Down
8 changes: 2 additions & 6 deletions fontship.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,14 @@ endef

depend_font = fc-match "$1" family | $(GREP) -qx "$1"

.PHONY: tex-gyre-fonts
tex-gyre-fonts:
$(CONTAINERIZED) && pacman --noconfirm --needed -Sq $@ ||:
$(call depend_font,TeX Gyre Termes)

define POSTFONTSHIPEVAL =

$$(DOCSDIR)/preview.pdf: $$(DOCSDIR)/preview.tex | $$(STATICOTFS) $$(BUILDDIR)
xelatex --interaction=batchmode -output-directory=$$(BUILDDIR) $$<
cp $(BUILDDIR)/$$(@F) $$@

$$(DOCSDIR)/sample.pdf: $$(DOCSDIR)/sample.sil $$(STATICOTFS) tex-gyre-fonts
$$(DOCSDIR)/sample.pdf: $$(DOCSDIR)/sample.sil $$(STATICOTFS)
$(call depend_font,TeX Gyre Termes)
sile -o $$@ -d versions $$<

$$(DOCSDIR)/waterfalls.pdf: $$(DOCSDIR)/waterfalls.sil $$(STATICOTFS)
Expand Down

0 comments on commit 0e8e364

Please sign in to comment.