Skip to content

Commit

Permalink
Apply the font with a patch
Browse files Browse the repository at this point in the history
Signed-off-by: Marcello Seri <[email protected]>
  • Loading branch information
mseri committed Sep 5, 2024
1 parent bc5f660 commit 5a7bf97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/generate_pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ jobs:
# run: |
# tectonic hm.tex
# mv hm.pdf assets/hm-tg.pdf

- name: prepare sources
run: git apply ci.patch

- name: compile.sh
uses: dante-ev/latex-action@latest
Expand All @@ -86,9 +83,9 @@ jobs:
name: hm-tg-${{ env.BUILD_DATE }}-${{ env.GITHUB_TAG }}.pdf
if-no-files-found: error

- name: Remove TeX Gyre font customizations, falls back to OpenDyslxic
run: sed -i.bak '14,16d' hm.tex
- name: Use OpenDyslxic
run: git apply ci.patch

# - name: Run Tectonic
# run: |
# tectonic hm.tex
Expand Down
16 changes: 8 additions & 8 deletions ci.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
diff --git a/hm.tex b/hm.tex
index 094b8dd..4402186 100644
index b2bb316..f091739 100644
--- a/hm.tex
+++ b/hm.tex
@@ -7,9 +7,9 @@
\usepackage[utf8]{inputenc}
@@ -8,9 +8,9 @@
\else
\usepackage{fontspec} % XeLaTeX or LuaLaTeX
- \setmainfont{OpenDyslexic}
- \setsansfont{OpenDyslexic}
- \setmonofont{OpenDyslexicMono}

- \setmainfont[Renderer=Basic, Numbers=OldStyle, Scale = 1.0]{TeX Gyre Pagella}
- \setsansfont[Renderer=Basic, Scale=0.90]{TeX Gyre Heros}
- \setmonofont[Renderer=Basic]{TeX Gyre Cursor}
+ \setmainfont[Path=/usr/share/fonts/opentype/opendyslexic/, Extension=.otf]{OpenDyslexic}
+ \setsansfont[Path=/usr/share/fonts/opentype/opendyslexic/, Extension=.otf]{OpenDyslexic}
+ \setmonofont[Path=/usr/share/fonts/opentype/opendyslexic/, Extension=.otf]{OpenDyslexicMono}

\setmainfont[Renderer=Basic, Numbers=OldStyle, Scale = 1.0]{TeX Gyre Pagella}
\setsansfont[Renderer=Basic, Scale=0.90]{TeX Gyre Heros}
\fi

0 comments on commit 5a7bf97

Please sign in to comment.