bevyengine / bevyengine/bevy

Ruby text support

Open
#14,882 1 comment 0 reactions 0 assignees View on GitHub
A-Text C-Feature S-Blocked
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?
Some languages, mostly Asian, have a typographical form where annotations are written above / below / next to characters or words. This behaviour is pretty hard to implement by yourself as there are many pitfalls. Games will sometimes use this form of annotation when the meaning of a character/word cannot be extrapolated from the context.

## What solution would you like?
I'm unsure on whether to create a new Text component with ruby support or to extend the capabilities of the current text component. I'm still unsure on what the best way is on implementing it in the TextSection. The implementations I've considered:
- using the [unicode spec](https://www.unicode.org/charts/nameslist/n_FFF0.html ) when parsing the TextSection.value to determine the annotation groups
- adding an annotation field to the TextSection struct, (This does mean that if a text annotates every character that there are a lot of textsections, i don't know if that performs wel)
In both cases TextSection would have a field describing where to place the annotation (above, below, right or left)

## What alternative(s) have you considered?

There are currently no crates that over these features.

## Additional context

I'm planning on implementing this myself, but I would like some peoples opinions

Contributor guide

Open the contributing guide

Research direction

Start by reading the current Text component and TextSection implementation, then review the linked Unicode specification for ruby annotation grouping and placement. Compare extending TextSection with introducing a new Text component, and clarify the performance implications of per-character annotations. Done means ruby annotations support the required above, below, right, and left placements with a settled API and tests.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.