From ae8a770331208e4beca5cc9edd00cda8662839d7 Mon Sep 17 00:00:00 2001 From: Jack Koch Date: Mon, 27 Apr 2026 08:39:11 -0600 Subject: [PATCH 1/2] Fix polytonic-Greek mid-word truncation in CI-built PDF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two consecutive `\setTransitionsFor` calls for GreekAndCoptic and GreekExtended overwrite each other's cross-pair token registers — the second call wins, so the GE→GAC boundary ends up firing `\normalfont`. On CI Linux the main font lacks polytonic Greek, so any GAC character following a GE character within a word (σ in νοῦς, ν in τὸ ἕν, σία in οὐσία) was being typeset in a font with no glyph for it and rendering as a missing-glyph gap. Null both directions of the GAC↔GE pair via \XeTeXinterchartoks so the Latin→Greek-font transition stays active across the boundary. Add a glossary-PDF artifact upload to ci-check.yml so the deployed PDF can be visually verified before merge, plus a temporary fc-list diagnostic step to record which fonts the CI runner actually resolves. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci-check.yml | 17 +++++++++++++++++ scripts/glossary/header.tex | 13 +++++++++++++ 2 files changed, 30 insertions(+) diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index fec6a7c..b7f8699 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -34,5 +34,22 @@ jobs: fonts-noto-cjk fonts-noto-cjk-extra \ fonts-noto-core + # TEMPORARY: remove once Greek-rendering fix is verified. + - name: Debug font availability + run: | + echo "=== Greek-language fonts (fc-list :lang=el) ===" + fc-list :lang=el | sort + echo "=== Main-font fallback candidates ===" + for f in "Times New Roman" "FreeSerif" "TeX Gyre Termes" "Latin Modern Roman" "Noto Serif" "GFS Didot" "Linux Libertine O"; do + if fc-list | grep -q -i -F "$f"; then echo "AVAILABLE: $f"; else echo "MISSING: $f"; fi + done + - name: Build Quartz run: npm run build + + - name: Upload glossary PDF + if: always() + uses: actions/upload-artifact@v4 + with: + name: glossary-pdf + path: content/dhamma/glossary.pdf diff --git a/scripts/glossary/header.tex b/scripts/glossary/header.tex index e9cb833..3cabec4 100644 --- a/scripts/glossary/header.tex +++ b/scripts/glossary/header.tex @@ -92,4 +92,17 @@ \setTransitionsFor{GreekAndCoptic}{\greekfont}{\normalfont} \setTransitionsFor{GreekExtended}{\greekfont}{\normalfont} +% Suppress font-switching at the GreekAndCoptic↔GreekExtended boundary. +% Both blocks share \greekfont, but \setTransitionsFor writes both an +% "enter" and a "leave" token to every cross-pair register, and whichever +% \setTransitionsFor call runs second wins. As written above, the GE→GAC +% pair register ends up holding \normalfont (the "leave GE" token from +% line 93), which strips the Greek font from any GAC character that +% follows a GE character within a word (the σ in νοῦς, the ν in τὸ ἕν, +% the σία in οὐσία). On CI the main font lacks polytonic Greek, so those +% trailing characters render as missing glyphs. Nulling both directions +% of the pair keeps \greekfont active across the boundary. +\XeTeXinterchartoks \GreekAndCopticClass \GreekExtendedClass = {} +\XeTeXinterchartoks \GreekExtendedClass \GreekAndCopticClass = {} + \setlength{\parskip}{4pt plus 1pt minus 1pt} From 9e022c266de658eaf2cd5b59e10f4c11c003a404 Mon Sep 17 00:00:00 2001 From: Jack Koch Date: Mon, 27 Apr 2026 08:42:50 -0600 Subject: [PATCH 2/2] Remove temporary fc-list debug step from ci-check.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fc-list output confirmed the precondition for the Greek-rendering fix (\setmainfont resolves to Latin Modern Roman with no polytonic Greek; \greekfont resolves to Noto Serif which has full coverage). Verification done — drop the diagnostic step. Keep the artifact upload. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci-check.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index b7f8699..a7f1406 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -34,16 +34,6 @@ jobs: fonts-noto-cjk fonts-noto-cjk-extra \ fonts-noto-core - # TEMPORARY: remove once Greek-rendering fix is verified. - - name: Debug font availability - run: | - echo "=== Greek-language fonts (fc-list :lang=el) ===" - fc-list :lang=el | sort - echo "=== Main-font fallback candidates ===" - for f in "Times New Roman" "FreeSerif" "TeX Gyre Termes" "Latin Modern Roman" "Noto Serif" "GFS Didot" "Linux Libertine O"; do - if fc-list | grep -q -i -F "$f"; then echo "AVAILABLE: $f"; else echo "MISSING: $f"; fi - done - - name: Build Quartz run: npm run build