Skip to content

Commit

Permalink
ci: Setup font used in comparison sample in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Sep 26, 2024
1 parent 76bbe44 commit 3c4d576
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/fontship.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ 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 @@ -28,9 +30,11 @@ jobs:
args: documentation/waterfalls.sil
- name: SILE
id: sile
uses: sile-typesetter/sile@v0
with:
args: documentation/sample.sil
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
- name: Fontship package
id: fontship
uses: theleagueof/fontship@v0
Expand Down
9 changes: 8 additions & 1 deletion fontship.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,20 @@ $$(BUILDDIR)/$1-%-instance.otf: $$(BUILDDIR)/$1-%-normalized.sfd $(GSUB) $(BUILD

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)
$$(DOCSDIR)/sample.pdf: $$(DOCSDIR)/sample.sil $$(STATICOTFS) tex-gyre-fonts
sile -o $$@ -d versions $$<

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

0 comments on commit 3c4d576

Please sign in to comment.