Hacker News new | past | comments | ask | show | jobs | submit login
Requirements for Japanese Text Layout (w3.org)
90 points by PaulHoule on Nov 17, 2022 | hide | past | favorite | 10 comments



This English-only white guy was tasked with supporting Ruby in an early implementation of iBooks. Ha ha, that was a whole new world I had to try to come up to speed on. In the end it was, for my part, a lot of wrangling with CoreText to get a vertical layout positioned correctly.

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).


Well, there's definitely Ruby support in the Webkit engine these days (as well as in Gecko and Blink); you can do something like

    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.


One of my hobbies is printing "three-sided cards" that frequently have anime characters as subjects, these have a description of of the image in English at the bottom left but I pull out proper names in Japanese and set them vertically on the upper right. Here is one example

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).


>Just scrolling through this site makes my head spin.

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.


If you like this, there's a whole family of such documents:

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)


I like that Chinese one because I am working on a project involving Chinese text now and because it is written in three character sets: English, Simplified and Traditional Chinese.


Ah, that's why the Chinese appears twice. I didn't see a difference between them (not that I was looking hard).

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?


Chinese text is usually the same size as English text: I think people just get used to the vague shape of them and don't actually need to see every stroke precisely.

Only the period 。 and the enumeration comma 、 existed before European influences.


For the font size, it's kind of the same, kind of not. The numerical value of the font sized used is typically the same, but Chinese characters fill the allocated space more thoroughly.

i 泳


As a typography enthusiast (and Japanese Studies major ...) I have looked at this page purely for fun multiple times. Great resource!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: