Furigana implementation for japanese messages #1039
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose.

This is pain to learn Japanese when you don't know the readings of all that kanji. To help myself and my daughter I have modified mastodon android client in the way that every kanji character will be inscribed by kana. I know, very limited audience will found that useful, but I think this is cool :-)
Library used.
To show the reading https://github.com/atilika/kuromoji library was used. It break down Japanese sentences and return a reading in kana. For all the scholars pain reading depend on context, thus use of heavy external library is inevitable.
UI.
By default, furigana is disabled. There are two checkboxes added to the Settings → Display to enable furigana and change between hiragana and katakana.
Code added.
Main code is located in FuriganaHelper.java and FuriganaSpan.java classes.
Code changed.
CustomEmojiSpan.java changed because it draw emoji at the top of the line, not related to baseline. Hope it not broke things a lot.
Example.