Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertical text handling in Unicode #140

Open
r12a opened this issue Sep 12, 2017 · 6 comments
Open

Vertical text handling in Unicode #140

r12a opened this issue Sep 12, 2017 · 6 comments
Labels
i:writing_mode Writing mode l:arb Arabic question s:arab Arabic script (Used for arb + pes)

Comments

@r12a
Copy link
Contributor

r12a commented Sep 12, 2017

This is brought here from #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?

@r12a
Copy link
Contributor Author

r12a commented Sep 12, 2017

My response was:

I wonder what real life use cases they base this on. Perhaps we should ask them.

@r12a r12a mentioned this issue Sep 12, 2017
@behnam
Copy link
Member

behnam commented Sep 12, 2017

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.

@r12a r12a added the question label Sep 13, 2017
@r12a
Copy link
Contributor Author

r12a commented Sep 13, 2017

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)

@khaledhosny
Copy link

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

@behnam
Copy link
Member

behnam commented Oct 16, 2017

Thanks @Tosche for the interesting talk! Here's some discussion we've had about the direction of Arabic script in (completely) vertical setting.

@r12a r12a added the i:writing_mode Writing mode label Feb 5, 2020
@r12a r12a added the l:arb Arabic label Feb 15, 2023
@r12a r12a added the s:arab Arabic script (Used for arb + pes) label Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i:writing_mode Writing mode l:arb Arabic question s:arab Arabic script (Used for arb + pes)
Projects
None yet
Development

No branches or pull requests

3 participants