A Simple iPhone Application adding Ruby Characters (Furigana) to Japanese Text.
This app uses CFStringTokenizer and CFStringTransform to parse Japanese text.
Chinese Characters (Kanji) are automatically transliterated into Hiragana.
Text is displayed using CoreText, making use of CTRubyAnnotationRef (new in iOS8) to display Ruby Characters (Furigana) above the original Japanese text.
Both horizontal (横書き) and vertical (縦書き) text layouts are supported.
Layouts can be shared and printed.
- layouting text with Ruby characters is slow
CTFrameSetter, especially CTFramesetterSuggestFrameSizeWithConstraints occasionally crashes when laying out 'rubyfied' text. I believe this is due to some problems with the layout geometry. This issue has been fixed in iOS8.2.
This app was inspired by two articles on NSHipster on CFStringTokenizer / CFStringTransform and CTRubyAnnotationRef. String parsing and transliteration is based on the NSString Category NSString-Japanese by 00StevenG.