Skip to content

fix(render): fail loudly when fontconfig finds no system fonts - #7413

Open
sx4im wants to merge 1 commit into
heygen-com:mainfrom
sx4im:fix-7406-no-fonts-render-fail
Open

sx4im wants to merge 1 commit into
heygen-com:mainfrom
sx4im:fix-7406-no-fonts-render-fail

Conversation

@sx4im

@sx4im sx4im commented Nov 8, 2026

Copy link
Copy Markdown

What

A new Linux-only preflight check runs fc-list before the browser launches. Zero fonts fails the render with the fix in the hint, and doctor shows the font count.

Why

On Linux, when fontconfig lists zero fonts, hyperframes render exits 0 and every frame comes out with no text at all, even though HyperFrames embeds a web font. doctor passed too, so there was no hint anything was wrong.

Related work

Fixes #7406

How

checkSystemFonts() in packages/cli/src/browser/preflight.ts counts non-empty fc-list lines and joins runEnvironmentChecks() when the browser is included, so render stops on the failed outcome and doctor lists it. A missing or failing fc-list only warns, since the binary on PATH may not be the fontconfig Chromium loads. Off Linux the check is a no-op.

Test plan

How was this tested?

  • Unit tests added/updated
  • Manual testing performed
  • Documentation updated (if applicable)
  • Comments follow CONTRIBUTING.md "Comments": they say why, not what, and a bug fix says what the code must do and how to reproduce the bug

New tests in packages/cli/src/browser/preflight.test.ts: 0 lines fails, N lines passes, missing or failing fc-list warns, no-op off Linux. 39 preflight tests and 34 doctor tests pass, CLI typecheck is clean, oxlint and oxfmt are clean. Ran the built CLI here: doctor reports System fonts: fontconfig fonts: 1877, matching fc-list on this machine.

Note: check and snapshot do not run the shared preflight, so they are not covered by this change.

@mintlify

mintlify Bot commented Nov 8, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 8077df8.

Approve preview

This branch has not been deployed

No deployments
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.

render exits 0 with all text missing when Chromium finds no system fonts on Linux

1 participant