Skip to content

Commit

Permalink
docs(sample): Change comparison to be against an actual Times New Rom…
Browse files Browse the repository at this point in the history
…an look-alike
  • Loading branch information
alerque committed Sep 26, 2024
1 parent d5936bf commit ca2c9e1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 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: 5 additions & 4 deletions documentation/sample.sil
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
\use[module=packages.frametricks]
\use[module=packages.color]
\use[module=packages.rebox]
\use[module=packages.footnotes]
\begin{lua}

SILE.settings:set("document.lskip", SILE.types.node.glue(0))
Expand Down Expand Up @@ -66,7 +67,7 @@ end)
\begin[color=#345D00]{color}
\font[features=+smcp,size=26pt]{Libertinus Serif}

Comparison with Liberation Serif and Multilingual Sample Texts
Comparison with Times New Roman\footnote{Since the actual Times New Roman font is released under a non-free license, this document uses TeX Gyre Termes which is designed as a drop in replacement but also has extended language support not found in the original font.} and Multilingual Sample Texts
\end{color}
\end{center}

Expand Down Expand Up @@ -108,7 +109,7 @@ Ich hing in Gedanken meinem Forschungsprojekt nach (Na⁺ im Ton, SO₄²⁻ im
\end{font}
\framebreak

\begin[family=Liberation Serif]{font}
\begin[family=TeX Gyre Termes]{font}
\font-v \comparison
\end{font}

Expand All @@ -131,7 +132,7 @@ J’ignore jusqu’aux lieux qui le peuvent cacher.\par

\hbox

\begin[filename=LibertinusSerif-Regular.otf]{font}
\begin[filename=LibertinusSerif-Italic.otf]{font}
\font-v

\poem
Expand All @@ -141,7 +142,7 @@ J’ignore jusqu’aux lieux qui le peuvent cacher.\par

\hbox

\begin[filename=LibertinusSerif-Italic.otf]{font}
\begin[family=TeX Gyre Termes,style=Italic]{font}
\font-v

\poem
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 ca2c9e1

Please sign in to comment.