Store colors in `TextLayoutInfo` and extraction buffers per per glyph/slice
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## What problem does this solve or what need does it fill?
With per section color storage:
1. Text extraction has to query for the `TextColor` components seperately, adding extra complexity to the extraction function and degrading performance.
2. A new extracted item has to be queued per color change. This will be very expensive if you have a lot of different coloured glyphs.
## What solution would you like?
Store colors in `TextLayoutInfo` and the extraction buffers per per glyph/slice
## Alternatives
We could store the colors in a separate list of `(Color, Range)` or something.
The synchronisation would add complexity though and for games it's common to have large numbers of small text labels where per glpyh storage should be more efficient.
Contributor guide
Research direction
The issue names TextLayoutInfo, extraction buffers, TextColor, and per-glyph or per-slice storage, but no files or tests. Start by tracing text extraction and the current per-section color handling. Done means colors are available per glyph or slice without separate TextColor queries or queuing a new extracted item for each color change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100