Skip to content

fix: use resolvable font stack in diagram SVGs - #1628

Merged
ryansolid merged 1 commit into
v2-rebuildfrom
fix/diagram-font-stack
Aug 12, 2026
Merged

fix: use resolvable font stack in diagram SVGs#1628
ryansolid merged 1 commit into
v2-rebuildfrom
fix/diagram-font-stack

Conversation

@brenelz

@brenelz brenelz commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Problem

The diagram labels on /concepts/async-reactivity render as garbled glyphs in Firefox.

Both diagram SVGs declare:

font-family="Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif"

Inter is not bundled with the repo, and an SVG loaded through <img> cannot use the page's webfonts — it can only use locally installed fonts. So resolution falls through to the system-font aliases, and every one of them is fragile:

  • ui-sans-serif is not a supported generic family in Firefox
  • -apple-system / BlinkMacSystemFont point at the macOS system font, which Firefox has historically had trouble accessing correctly

Fix

Replace the aliases with real font files that exist on every platform:

- font-family="Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif"
+ font-family="Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif"

Applied to both async-update-timeline.svg and derived-state-effects-sequence.svg.

Verification

Rendered both SVGs in Firefox (headless, clean profile) before and after. The async-update-timeline.svg render is byte-identical across the change (85,729 bytes), confirming a healthy Firefox was already falling through to Helvetica — this only removes the ambiguity so it cannot land on a broken alias instead. No visual change on Chromium either.

Scope

I audited all 30 SVGs in the repo. These two were the only ones affected:

Files font-family Status
2 diagrams in public/images/diagrams/ the stack above fixed here
6 Excalidraw diagrams Helvetica, Segoe UI Emoji safe — real font, no aliases
22 logos / favicons / provider assets none (no text elements) n/a

Note

I was not able to reproduce the garbled rendering in a clean Firefox profile, so this is a fix for the most plausible cause rather than a confirmed repro. It is a strict robustness improvement regardless: the previous stack's behavior depended on browser-specific system-font alias handling, and the new one does not.

🤖 Generated with Claude Code

Both diagrams requested `Inter, ui-sans-serif, system-ui, -apple-system,
BlinkMacSystemFont, sans-serif`. Inter is not bundled, and an SVG loaded
through <img> cannot use the site's webfonts, so resolution fell through
to the system-font aliases: `ui-sans-serif` is not a supported generic in
Firefox, and `-apple-system`/`BlinkMacSystemFont` point at the macOS
system font, which Firefox has historically had trouble accessing. That
produced garbled glyphs in the diagram labels in Firefox.

Replace the aliases with real font files that exist on every platform.
Rendering is unchanged where the old stack already worked -- the Firefox
render of async-update-timeline.svg is byte-identical before and after.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy Preview for solid-docs-v2 ready!

Name Link
🔨 Latest commit d09e11f
🔍 Latest deploy log https://app.netlify.com/projects/solid-docs-v2/deploys/6a7ce7c4b0ac3f00087d9ae9
😎 Deploy Preview https://deploy-preview-1628--solid-docs-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@ryansolid
ryansolid merged commit 5c2f221 into v2-rebuild Aug 12, 2026
8 checks passed
@ryansolid
ryansolid deleted the fix/diagram-font-stack branch August 12, 2026 22:35
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.

2 participants