Ruby characters (Furigana): How to approach creating an extension #2533
Unanswered
Athakaspen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there! I'm new to Dialogic (loving it so far) and want to create a custom extension to implement ruby characters, aka Furigana, for Japanese text.

If you're unfamiliar, ruby characters are small letters positioned (usually) above the main word in a line of text. Here's an example:
I want to implement this as a new 'command'. I'm imagining a syntax like this:
My name is [r=ジェームズ]James[/r], good to meet you.
My question is, how would I go about adding a new command like this to all existing text-rendering objects? The documentation covers adding effects and modifiers, but I'm not sure which of those this would be (probably a modifier?) or if I need a separate subsystem or anything else. Since I'm adding text out-of-line, I probably need to create a new label (or equivalent) for each one, which may complicate things.
Edit: After posting this I started looking into a custom BBCode solution within RichTextLabel, but got a bit stuck here too (as RichTextEffect can't add new text or see text outside of itself). If anyone has an idea on how to implement it here, that'd be an even more general solution, but maybe more complicated.
I'm happy to struggle through the details of implementation, but I'm hoping for a big-picture suggestion for how to implement this from people who know the system better.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions