Fix excessive word spacing on Linux caused by emoji-font fallback#3187
Merged
Fix excessive word spacing on Linux caused by emoji-font fallback#3187
Conversation
Add Linux UI fonts (Ubuntu, Cantarell, Liberation Sans, DejaVu Sans) before the emoji fonts in the body font stack so the space glyph resolves from a text font instead of Noto Color Emoji's wide space glyph.
d9075f5 to
4759a62
Compare
ivan-ottinger
approved these changes
Apr 22, 2026
Collaborator
📊 Performance Test ResultsComparing 4759a62 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related issues
How AI was used in this PR
AI-assisted: diagnosed the root cause (Chromium per-glyph font fallback picking up
Noto Color Emoji's wide U+0020 glyph on Linux because no text font earlier in the stack is installed there) and drafted the one-line insertion into the font stack. The change was reviewed by me before commit.Proposed Changes
Ubuntu,Cantarell,Liberation Sans,DejaVu Sans) to thebodyfont stack inapps/studio/src/index.css, positioned before the emoji fonts so a text font resolves first for the space glyph.-apple-system/BlinkMacSystemFont/Segoe UI).Why this fixes it
Chromium does per-glyph fallback in declared order. On Linux,
-apple-system,BlinkMacSystemFont,Segoe UI, and oftenRobotoaren't installed, so the first font that is installed used to beNoto Color Emoji— which has a very wide space glyph. Chromium would pick it up for U+0020 and stop, producing the gaps. TheNoto Sans/sans-serifentries already at the tail of the stack were never consulted because resolution had already terminated. Inserting Linux text fonts before the emoji fonts gives Chromium a real text font to resolve the space from.Testing Instructions
npm startand visually confirm type still renders in the system font and there is no additional spacing.npm startand visually confirm type still renders in the system font (SF Pro / -apple-system) — no regression.Before / After
Before:

After: normal inter-word spacing on Linux
Pre-merge Checklist