Skip to content

Fix: Render Chinese and Japanese characters on invoice PDFs - #1384

Merged
daveearley merged 1 commit into
mainfrom
develop
Oct 11, 2026
Merged

daveearley merged 1 commit into
mainfrom
develop

Conversation

@daveearley

Copy link
Copy Markdown
Contributor

ℹ️ Thank you for your contribution! We really appreciate it. However, please note that PRs that do not follow the contribution guidelines will be closed without review. Non-trivial changes require prior discussion via an issue or discussion thread. PRs with empty or unedited descriptions will also be closed.

Please delete everything above this line, then fill in the sections below.


What changes I've made

Why I've made these changes

How I've tested these changes

Checklist

  • I have read the contributing guidelines.
  • My code follows the coding standards of the project.
  • I have tested my changes, and they work as expected.
  • I understand that this PR will be closed if I do not follow the contributor guidelines and if this PR template is left unedited.

* Fix: Render Chinese and Japanese characters on invoice PDFs

Invoices were rendered with DejaVu Sans only, which has no CJK glyphs,
so Chinese names, addresses, event titles and translated labels showed
as empty boxes.

- Bundle Noto Sans SC (Regular/Bold, OFL) and add it after DejaVu Sans
  in the invoice font stack; dompdf falls back per character
- Enable font subsetting (invoices drop from ~880 KB to ~25-50 KB)
- Use bold instead of weight 500 for info values, which fell back to
  Times and could not render CJK
- Route both invoice PDF paths through InvoicePdfRenderer, which skips
  the CJK font and logs a warning when the dompdf font cache is not
  writable, so invoices never fail to render

* Run the unwritable font cache test in-process so CI stderr logging can't fail it
@railway-app

railway-app Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the Hi.Events-pr-1384 environment in Hi.Events

Service Status Web Updated
Hi.Events Queue Worker ✅ Success (View Logs) Oct 11, 2026 at 1:34 pm UTC
Hi.Events Frontend 😴 Sleeping (View Logs) Web Oct 11, 2026 at 12:42 pm UTC
Hi.Events Scheduler ✅ Success (View Logs) Oct 11, 2026 at 12:34 pm UTC
Hi.Events API ✅ Success (View Logs) Web Oct 11, 2026 at 12:29 pm UTC
1 service not affected by this PR
  • Maildev

@railway-app
railway-app Bot temporarily deployed to Hi.Events / Hi.Events-pr-1384 October 11, 2026 12:27 Destroyed
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ E2E · smoke

✅ Passed ❌ Failed ⚠️ Flaky ⏭️ Skipped ⏱️ Duration
95 0 1 0 2m 57s

Flaky (passed on retry)

  • ⚠️ organizer/organizer-management.spec.ts — organizer management › an organizer creates a second organizer from the global menu

View run

@daveearley daveearley changed the title Fix: Render Chinese and Japanese characters on invoice PDFs (#1383) * Fix: Render Chinese and Japanese characters on invoice PDFs Invoices were rendered with DejaVu Sans only, which has no CJK glyphs, so Chinese names, addresses, event titles and translated labels showed as empty boxes. - Bundle Noto Sans SC (Regular/Bold, OFL) and add it after DejaVu Sans in the invoice font stack; dompdf falls back per character - Enable font subsetting (invoices drop from ~880 KB to ~25-50 KB) - Use bold instead of weight 500 for info values, which fell back to Times and could not render CJK - Route both invoice PDF paths through InvoicePdfRenderer, which skips the CJK font and logs a warning when the dompdf font cache is not writable, so invoices never fail to render * Run the unwritable font cache test in-process so CI stderr logging can't fail it Fix: Render Chinese and Japanese characters on invoice PDFs Oct 11, 2026
@daveearley
daveearley merged commit 788bf58 into main Oct 11, 2026
21 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 11, 2026
@railway-app
railway-app Bot temporarily deployed to Hi.Events / staging October 23, 2026 19:52 Inactive

This branch was successfully deployed

1 inactive deployment
Hi.Events / staging — 722eb2df Deployed Oct 23, 2026 by railway-app[bot]
Hi.Events / Hi.Events-pr-1384 — 722eb2df Deployed Oct 11, 2026 by railway-app[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant