bevyengine / bevyengine/bevy

Ui Text does not word wrap if next "word" begins with a dot

Open
#12,098 4 comments 0 reactions 0 assignees View on GitHub
A-Text A-UI C-Bug
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version

`0.13`

## What you did

I have a text that ends with three dots.

## What went wrong

The three dots overflow the text node. I have word wrapping and clipping in both axes set. The red box is the height and width of the text node child. The parent is the much bigger bubble image.

![no_clip](https://github.com/bevyengine/bevy/assets/13656913/ce33466a-6cb8-45e8-8d6a-222ef8b8bf24)

As long as the word starts with a dot, it's not wrapped.

![no_clip_more_space_has_letter](https://github.com/bevyengine/bevy/assets/13656913/65a7ba1b-4d90-4f89-bd2d-caa98739fdd8)

Finally wraps when leading dot is removed.

![clip_when_starts_with_letter](https://github.com/bevyengine/bevy/assets/13656913/407a7b17-2134-494c-81e1-ec9fe8d4223a)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Bevy 0.13 using a text node with word wrapping and clipping enabled, comparing text that begins with dots against text beginning with a letter. Then trace the text UI word-wrapping behavior; done means leading-dot text wraps and clips within the text node instead of overflowing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.