Re: Styling vertical text, initial article and interactive tests

On 26/05/2015 20:58, Florian Rivoal wrote:
> The key is that text-orientation isn't used alone, but together with the writing-mode property.
>
> If you're setting latin text on book spines or captions of the side of images or tables, you pick vertical-lr or vertical-rl as the value of writing-mode depending on which side of the figure you want your caption on or which way spines go in your country or which side of the arch you're on, and "text-orientation:sideways" automatically picks the right one between sideways-right and sideways-left to make the orientation of glyphs in a line match the stacking order of lines. Setting the text-orientation to "sideways" on the entire document for latin text (or any natively horizontal script) will give you the right thing. You could just used sideways-right and sideways-left explicitly, but you'd have to make sure to keep them in sync with vertical-lr and vertical-rl, which could be tedious and error prone.
>
> For pieces of latin text in vertical CJK, sideways also computes to sideways-right since they use which use vertical-rl), and that's what you want, So latin-in-CJK, it doesn't matter if you specify sideways or sideways-right explicitly.
>
> However, vertical Mongolian, which uses vertical-lr, also uses sideways-right for inline pieces of latin text, so it must be set explicitly to sideways-right.
>
> There's one more use case for sideways-left I am aware of. RTL scripts such as Arabic or Hebrew, when embedded in vertical CJK text, are often set with sideways-right, so that the glyph orientation matches latin text. However, sometimes it is set with sideways-left. Doing so means that the CJK text and the RTL text both flow downwards, removing the need for bidi.

hi Florian,

the bit i don't understand is this:

[
However, vertical Mongolian, which uses vertical-lr, also uses 
sideways-right for inline pieces of latin text, so it must be set 
explicitly to sideways-right.
]

what does 'it' refer to? I'm assuming it refers to 'inline pieces of 
latin text' rather than 'vertical Mongolian'?

either way, i don't see why there's any need to explicitly set 
sideways-right.  Try the interactive tests.  Writing-mode: vertical-lr 
on its own produces correctly oriented vertical mongolian with embedded 
latin (and/or arabic) text automatically because the default value for 
text-orientation is mixed. Latin and arabic characters are typically 
rotated 90° clockwise in mongolian text.

(Note that 90° clockwise rotation also makes sense for rtl scripts, 
since the wrapping algorithms work the same way as for horizontal text 
when you get to the end of a line. You can try this out by reducing the 
height of the bounding box in the interactive tests, and you'll see that 
all the browsers do the right thing. The few times i've seen 
sideways-left orientation for Latin or other characters was in very 
short runs that had no line breaks.)

i also don't understand why the spec says, in the explanation of 
'sideways' value:

"This value is equivalent to sideways-right in vertical-rl writing mode 
and equivalent to sideways-left in vertical-lr writing mode."

sideways-left is not the natural orientation for text in mongolian.

what am i missing?

ri

Received on Wednesday, 27 May 2015 16:32:32 UTC