mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-08 22:35:36 +02:00
fix(make-pdf): Liberation Sans font fallback for Linux rendering
On Linux (Docker, CI, servers), neither Helvetica nor Arial exist. Our CSS stacks were falling through to DejaVu Sans — wider letterforms that look like Verdana, not the intended Helvetica/Faber look. Liberation Sans is the standard metric-compatible Arial clone (SIL OFL 1.1, apt package fonts-liberation). - print-css.ts: all four font stacks (body + @top-center + @bottom-center + @bottom-right CONFIDENTIAL) gain "Liberation Sans" between Helvetica and Arial. File-header docblock updated to reflect the new stack. - .github/docker/Dockerfile.ci: explicit apt-get install fonts-liberation + fontconfig with retry, fc-cache -f, and a verify step that fails the build loud if the font disappears. Playwright's install-deps happens to pull this in today but the dep is implicit and could silently regress. - SKILL.md.tmpl: one-sentence note pointing Linux users at fonts-liberation. - SKILL.md: regenerated via bun run gen:skill-docs --host all (only make-pdf's generated file changed — verified clean diff scope). - render.test.ts: 2 assertions — Liberation Sans in body stack AND in at least one @page margin-box rule (proves all four intended stacks got touched, not just one). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -470,6 +470,10 @@ left-aligned body, Helvetica throughout, curly quotes and em dashes, optional
|
||||
cover page and clickable TOC, diagonal DRAFT watermark when you need it.
|
||||
Copy-paste from the PDF produces clean words, never "S a i l i n g".
|
||||
|
||||
On Linux, install `fonts-liberation` for correct rendering — Helvetica and Arial
|
||||
aren't present by default, and Liberation Sans is the standard metric-compatible
|
||||
fallback. CI and Docker builds install it automatically via Dockerfile.ci.
|
||||
|
||||
## MAKE-PDF SETUP (run this check BEFORE any make-pdf command)
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user