Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
140 stars 2 forks source link

Support for Ruby Text / Furigana #884

Open Psychpsyo opened 11 months ago

Psychpsyo commented 11 months ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when trying to have ruby text anywhere in Resonite(レソナイト).

Describe the solution you'd like

Some way to use ruby annotations in regular text within Resonite. RTF tags similar to those in HTML (see below) seem like a good way to go to me.

Describe alternatives you've considered

  1. Not using Ruby text. (but I want to)
  2. Manually positioning a second text element above the first one. (very annoying and not feasible for longer sections of text)
  3. Putting the ruby annotations in brackets after the text it is annotating. (Doable and readable but not pretty)

Additional Context

This way of formatting text is commonly used in Japanese, Chinese and Korean. It is supported in HTML (and Github Markdown) through the use of <ruby> and <rt> tags, like so:

<ruby>
東<rt>とう</rt>
京<rt>きょう</rt>
</ruby>

which would render like this: とうきょう

Frooxius commented 11 months ago

Hmm. This is non-trivial to add to the text rendering system. From testing it it seems like it essentially adds additional "text" and the width of the overall character or set of characters it applies to is whichever one is higher, like so:

Potatoesshort areReeeeeeaaaaaallly llooooooooooooong yuummmmmmmmmmmmmmmmmmmmmmmmmmy

To prioritize this, we'd need to see significant interest in this or some important use-cases to justify the engineering effort required, especially since you can do it "by hand" as a workaround.