alreq
alreq copied to clipboard
Vertical text handling in Unicode
This is brought here from https://github.com/w3c/alreq/issues/102
@behnam wrote
Continuing the discussion on behavior in vertical lines...
From http://www.unicode.org/reports/tr9/#Vertical_Text
In the case of vertical line orientation, the Bidirectional Algorithm is still used to determine the levels of the text. However, these levels are not used to reorder the text, because the characters are usually ordered uniformly from top to bottom. Instead, the levels are used to determine the rotation of the text. Sometimes vertical lines follow a vertical baseline in which each character is oriented as normal (with no rotation), with characters ordered from top to bottom whether they are Hebrew, numbers, or Latin. When setting text using the Arabic script in vertical lines, it is more common to employ a horizontal baseline that is rotated by 90° counterclockwise so that the characters are ordered from top to bottom. Latin text and numbers may be rotated 90° clockwise so that the characters are also ordered from top to bottom.
The Bidirectional Algorithm is used when some characters are ordered from bottom to top. For example, this happens with a mixture of Arabic and Latin glyphs when all the glyphs are rotated uniformly 90° clockwise. The Unicode Standard does not specify whether text is presented horizontally or vertically, or whether text is rotated. That is left up to higher-level protocols.
Therefore, Unicode recommends here that when there's only one text (strong chars only) direction, the Arabic should be written top-to-bottom, so glyph rotations should be 90º CCW. This contradicts the behavior recommended by latest CSS specs, and what we have in the document at the moment.
What do you think?
My response was:
I wonder what real life use cases they base this on. Perhaps we should ask them.
What Unicode says would be the primary solution for any case I can think of, as a native speaker. I guess the question would be why CSS recommends top-to-bottom, even when there's no bidi matters involved.
My guess is that it has to do with it being significantly simpler to implement, especially in environments where the length of the line can be randomly altered by the user. The CSS approach means that the line-break point is always at the bottom of the line. It also makes it easier to handle combinations of Latin text embedded within Arabic, since they both share the same orientation and the directional layout is the same as for horizontal text (just on it's side).
@behnam do you have examples of arabic text in vertical set lines of CJKM? (Note that i'm not referring to book spines, table headers, etc, since those would use writing-mode: sideways-lr/rl)
(From http://fantasai.inkedblade.net/style/discuss/vertical-bidi)
(From https://lists.w3.org/Archives/Public/www-style/2015Jul/0071.html)
Here is a video from this year’s ATypI about Sini style of Arabic calligraphy, and there was a remark about the direction of vertical Arabic: https://youtu.be/ZW_NACTXJ80?list=WL&t=1011 (the whole video is quite interesting).
Thanks @Tosche for the interesting talk! Here's some discussion we've had about the direction of Arabic script in (completely) vertical setting.