bevyengine / bevyengine/bevy

Incorrect layout caused by special characters

Open
#22,037 1 comment 0 reactions 0 assignees View on GitHub
A-Text C-Bug C-Dependencies S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

- bevy 0.17, and below (0.16...)

## What you did

Using bevy_fluent, with a parameter, my UI layout was broken

Image

## What went wrong

- I expected text to keep within their node space, its Node size being pushed to be bigger.

## Additional information

I realized characters `\u{2068}` and `\u{2069}` were injected into the localized string. Filtering those out fixes the issue 🎉.

Still, this is probably a symptom of special characters incorrectly handled somewhere, maybe on taffy side?

- See minimal reproduction: https://github.com/ThierryBerger/bevy_incorrect_layout
- Maybe related to https://github.com/bevyengine/bevy/issues/15592

Contributor guide

Open the contributing guide

Research direction

Start with the linked minimal reproduction and reproduce the layout problem using bevy_fluent, then compare behavior with and without the injected \u{2068} and \u{2069} characters. Read the related issue #15592 for context and trace where the special characters affect text layout; done means localized text stays within its node space without filtering characters externally.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.