bevyengine / bevyengine/bevy

Query for root text entity components directly.

Open
#23,188 0 comments 0 reactions 0 assignees View on GitHub
A-Text C-Performance S-Blocked
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

In the text systems `update_text2d_layout`, `measure_text`, and `update_text_layout` we query for the root text entities layout components, `ComputedTextBlock`, `TextLayout`, `TextLayoutInfo` etc, but collect their text section data seperately using the `TextReader` API.

## What solution would you like?

It should be much more efficient to include the text section components in the root text entity query, and then only use `TextReader` to access `TextSpan`s.

It's not stictly block by #19437 but I'd prefer to get #23166 merged first before this is done.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.