Skip to content

fix: honor selected fonts in PDF exports - #198

Merged
mattenarle10 merged 1 commit into
mainfrom
fix/196-print-font
Nov 10, 2026
Merged

mattenarle10 merged 1 commit into
mainfrom
fix/196-print-font

Conversation

@mattenarle10

Copy link
Copy Markdown
Owner

PDF export currently forces sans-serif even when mono is selected. Pass the existing prose font selection into export and label the setting "preview and print font."

  • Embed Inter and JetBrains Mono, including their Unicode subsets and regular/semibold weights, so print documents work without installed fonts or app asset URLs. Load these assets only during export and wait for fonts before printing.
  • Keep syntax-highlighted code monospace with every prose font.
  • Wrap long URLs and filenames within printed pages.
  • Give each export a separate temporary path so simultaneous exports with identical names cannot overwrite each other.

Fixes #196.

Validation:

  • bun test: 122 tests pass, including concurrent exports, font readiness, empty documents, and native IO errors.
  • bun run build: TypeScript and production build pass.
  • Chrome and macOS WKWebView checks pass for all three font choices, embedded font loading, monospace glyph widths, highlighted code, and horizontal overflow.
  • Generated three two-page PDFs, verified embedded fonts with pdffonts, and visually inspected all six rendered pages.

Use the selected prose font for printing and embed Inter and JetBrains Mono so exports work without installed fonts. Wait for font loading before printing, retain monospace highlighted code, wrap long content, and give concurrent exports separate temporary paths.

Fixes #196.
@mattenarle10
mattenarle10 merged commit e32f89d into main Nov 10, 2026
2 checks 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.

[feature request] Add ability to select printing font

1 participant