Skip to content

Don't break lines at narrow no-break space (U+202F) or figure space (U+2007) - #8845

Merged
emilk merged 2 commits into
mainfrom
emilk/narrow-no-break-space
Nov 6, 2026
Merged

emilk merged 2 commits into
mainfrom
emilk/narrow-no-break-space

Conversation

@emilk

@emilk emilk commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Text wrapping broke lines at U+202F (narrow no-break space) and U+2007 (figure space). They are no-break spaces, like U+00A0, so egui no longer breaks lines at them.

U+202F is a common thousands separator (1 234).

Top: thin space. Bottom: narrow no-break space.

snapshot

Also fixes cargo test -p epaint (without default_fonts), which did not compile.

U+202F (narrow no-break space) and U+2007 (figure space) are no-break
spaces, like U+00A0, so text wrapping must not break a line at them.
U+202F is commonly used as a thousands separator, e.g. `1 234`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/8845-emilknarrow-no-break-space
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

View snapshot changes at kitdiff

A shared test helper was gated on `default_fonts` while its callers were
not, so the test target did not compile. Tests that need the bundled
fonts are now gated like their neighbors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@emilk
emilk marked this pull request as ready for review November 6, 2026 17:08
@emilk emilk added bug Something is broken text Problems related to text egui epaint labels Nov 6, 2026
@emilk
emilk merged commit 91b5712 into main Nov 6, 2026
30 of 31 checks passed
@emilk
emilk deleted the emilk/narrow-no-break-space branch November 6, 2026 17:12
rerun-sync Bot pushed a commit to rerun-io/rerun that referenced this pull request Nov 9, 2026
### Related

* emilk/egui#8845

### Why

`re_format` uses thin space (U+2009) as thousands separator. Thin space
allows a line break, so wrapped text can split a number like `1 234 567`
across lines. Narrow no-break space (U+202F) is just as narrow, but does
not allow a line break.

### Agent

🛂 Created with the `create-pr` skill

---------

Source-Ref: bc3f3d4938dc5edfd46b88ea5933cf03f39ec3cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken egui epaint text Problems related to text

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant