Requirements for Japanese Text Layout
w3.org
w3.org
Just scrolling through this site makes my head spin. (Also makes me wonder what the hell Apple were thinking when they dropped that in my lap.)
I assumed that WebView would eventually add support for Ruby and my code could be ripped out ... I have no idea if that ever came to pass (I moved to another team within Apple not long after I had finished the Ruby code).
data:text/html,<h1><ruby><rb>H</rb><rt>hacker</rt><rb>N</rb><rt>news</rt></ruby>
in the browser URL bar to see it at work.Whether iBooks has adopted that in place of your code ... I have no idea.
https://gen5.info/$/Q.AEW.3FW2XIZUINQ/BACK800/0278.PNG
which is part of this group of cards:
https://gen5.info/$/Q.AEW.3FW2XIZUINQ/
I had to write my own layout engine for vertical CJK text which to first order is not very hard because the characters are all squares and I don't need to deal with punctuation, Ruby, and all that. What is still a hassle is mixing Roman characters in and having them look good, as these frequently turn up in proper names. For instance the second season of the popular anime Sailor Moon (セーラームーン) is called Sailor Moon R (セーラームーンR).
It's not as bad as it looks. It repeats everything in two languages (you can click "English" on the right to get rid of that), and there's a large section at the end which lists characters, then a glossary.
Chinese: https://www.w3.org/TR/clreq/
Ethiopic: https://www.w3.org/TR/elreq/
Arabic: https://www.w3.org/TR/alreq/
Tibetan: https://www.w3.org/TR/tlreq/
Korean: https://www.w3.org/TR/klreq/
Indic: https://www.w3.org/TR/ilreq/
Tamil: https://www.w3.org/TR/ilreq-taml/
Japanese was the first in the series, but the rest is equally fascinating (even if the documents may be somewhat less mature)
A question for you, the Chinese characters seem very much more complex eg 但也包括雜誌, which makes me wonder if they're meant to be read at the same font size as the english text or if they'd typically be printed larger?
Also, the full stops and commas seem to be used in Chinese text, as these inherited from european script or did they always exist in some form?
Only the period 。 and the enumeration comma 、 existed before European influences.
i 泳