Skip to content

Commit 3c4d576

Browse files
committed
ci: Setup font used in comparison sample in workflow
1 parent 76bbe44 commit 3c4d576

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/fontship.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
- name: Fetch tags
1717
run: |
1818
git fetch --prune --tags ||:
19+
- name: Setup prerequisites
20+
run: sudo apt-get -qq install fonts-texgyre
1921
- name: Fontship make
2022
uses: theleagueof/fontship@v0
2123
# Work around fontship v0.10.0 an below trying to force install-dist on first pass
@@ -28,9 +30,11 @@ jobs:
2830
args: documentation/waterfalls.sil
2931
- name: SILE
3032
id: sile
31-
uses: sile-typesetter/sile@v0
32-
with:
33-
args: documentation/sample.sil
33+
run: |
34+
docker run -t -v "/usr/share/texmf/fonts/opentype/public/tex-gyre/:/fonts" ghcr.io/sile-typesetter/sile:v0 -- documentation/sample.sil
35+
# uses: sile-typesetter/sile@v0
36+
# with:
37+
# args: documentation/sample.sil
3438
- name: Fontship package
3539
id: fontship
3640
uses: theleagueof/fontship@v0

fontship.mk

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,20 @@ $$(BUILDDIR)/$1-%-instance.otf: $$(BUILDDIR)/$1-%-normalized.sfd $(GSUB) $(BUILD
2828

2929
endef
3030

31+
depend_font = fc-match "$1" family | $(GREP) -qx "$1"
32+
33+
.PHONY: tex-gyre-fonts
34+
tex-gyre-fonts:
35+
$(CONTAINERIZED) && pacman --noconfirm --needed -Sq $@ ||:
36+
$(call depend_font,TeX Gyre Termes)
37+
3138
define POSTFONTSHIPEVAL =
3239

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

37-
$$(DOCSDIR)/sample.pdf: $$(DOCSDIR)/sample.sil $$(STATICOTFS)
44+
$$(DOCSDIR)/sample.pdf: $$(DOCSDIR)/sample.sil $$(STATICOTFS) tex-gyre-fonts
3845
sile -o $$@ -d versions $$<
3946

4047
$$(DOCSDIR)/waterfalls.pdf: $$(DOCSDIR)/waterfalls.sil $$(STATICOTFS)

0 commit comments

Comments
 (0)