Skip to content

Let localizations configure book fonts and PDF profiles - #448

Merged
rzach merged 1 commit into
OpenLogicProject:masterfrom
KokunoYumeto:codex/book-fonts-pdf-standard
Nov 16, 2026
Merged

rzach merged 1 commit into
OpenLogicProject:masterfrom
KokunoYumeto:codex/book-fonts-pdf-standard

Conversation

@KokunoYumeto

Copy link
Copy Markdown
Contributor

A localization can set the book’s text fonts, math fonts, and screen or print PDF profile before loading the class. Existing English books retain their current defaults. For example, the Gujarati screen edition loads its own text fonts and selects PDF/A-2b with these definitions before \documentclass.

\def\OLPloadMainFont{}
\def\OLPloadSansFont{}
\def\OLPscreenPDFStandard{a-2b}

These settings give the planned LuaLaTeX and PDF/UA-2 migration a place to change the defaults while preserving a localization’s explicit choices.

The English screen textbook (437 pages), print interior (436 pages) and cover each reproduced its original PDF byte for byte. In the Gujarati pilot, all 286 PDF pages matched the published edition in text and rendering, with only the two PDF trailer identifiers differing. The Gujarati EPUB and offline HTML archive matched their published bytes.

For the PDF/UA-2 work, both the original and patched English print interiors have duplicate /Lang and /OutputIntents keys in the PDF catalog. Strict parsing rejects the catalog, and the source of the duplication has yet to be traced.

OpenAI Codex (GPT-6 Astra, Ultra reasoning effort) prepared this change for the Open Logic translations following the November 16 correspondence.

@rzach
rzach merged commit a06113b into OpenLogicProject:master Nov 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants