Re: [css-writing-modes] Propose writing-mode: sideways-left

> On 06 Jul 2015, at 03:04, John Daggett <jdaggett@mozilla.com> wrote:
> 
> 
> Koji Ishii wrote:
> 
> > I'd like to propose:
> > 
> >   writing-mode: sideways-left
> > 
> > which is equivalent to setting the two properties:
> >   writing-mode: vertical-lr;
> >   text-orientation: sideways-left;
> 
> fantasai wrote:
> 
> > Thinking about this some more, though, I think what we can do
> > is move *both* orientations into the writing-mode, like this:
> > 
> >   writing-mode: horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr;
> >   text-orientation: mixed | upright | sideways (or sideways-rl)
> 
> Both of these proposals seem like extremely poor property design to me. Putting text-orientation values into the 'writing-mode' property will be totally confusing for authors, both those working with vertical captions in non-CJK text and for those working with non-CJK vertical scripts.
> 
> I think we should keep the 'writing-mode' and 'text-orientation' properties simple and orthogonal and not try and turn 'writing-mode' into some form of pseudo-shorthand.

I dislike Koji's proposal as well, but Fantasai sounds quite reasonable to me.

The system we've had so far (which I am not categorically opposed to, but is meeting some push back) isn't quite as orthogonal and clean as it seems at first:

- the-text orientation property conflates 2 things: glyph orientation and baseline orientation (only for the sideways-left value).

- the text-orientation property is ignored in one of the writing modes already: writing-mode:horizontal. In that sense writing-mode:horizontal determines all 3 aspects (block flow direction, baseline orientation, glyph orientation).

When it comes to implementing it, the fact that text-orientation:sideways-left afects the baseline orientation in addition to the glyph orientation makes things significantly more involved.

If we go with Fantasai's proposal:
- In addition to writing-mode:horizontal, we introduce 2 writing modes that determine all 3 aspects: sideways-left and sideways-right.

- text-orientation, being relieved of sideways-left, now never affects baseline orientation, and is solely about glyph orientation, making it much simpler to implement.

I do think we should bikeshed things a bit, so that the same word (sideways) is not used to both describe 2 of the writing modes and 1 of the text-orientations, but this is not essential to the proposal.

So this is arguably more orthogonal than what we currently have, is easier to implement, and is equally usable for CJK/M authors, and is more usable for horizontal script authors wanting sideways captions.


If we want truly orthogonal properties, we'd need to go with 3, not 2:
  writing-mode: horizontal | vertical-rl | vertical-lr
  glyph-orientation: upright | perpendicular-to-baseline | mixed
  baseline-orientation: normal | flipped

However, this is even less convenient than the current design to use for horizontal script authors wanting sideways captions, and it supports things that have no use-case:
 - vertical-* + upright + flipped
 - horizontal + * + flipped
 - vertical-rl + perpendicular-to-baseline + flipped on ltr scripts

> Implementations will eventually implement 'sideways-left' for vertical caption use. Just because they haven't done so yet is not really a good justification for moving 'sideways-left' into 'writing-mode'.

I don't know if implementations should eventually implement sideways-left, as currently designed.

As fantasai mentioned, There are 3 use cases for sideways-left:

 1) Counter-clockwise-rotated blocks of horizontal-script text
 2) Top-to-bottom orientation of RTL runs in vertical text
 3) Ogham

(2) is the one that introduces complexity, since it is the only one to require the ability to flip the baseline direction on inlines.

Yes, browsers will need to support (1), but that doesn't mean we must have a design that requires support for (2) if you're only trying to solve(1).

(3) is sufficiently supported if you can do (1).

Personally, I like (2), so all while discussions in the group described it as a very rare use case, I've been looking for evidence that it was more common and deserved support. I failed. As I am not currently in either a CJK/M country, or an rtl script country, my research has been hampered somewhat, but I did reach out to Japanese professors of Arabic studies, Persian studies, and Urdu studies, an Arabic and Persian speaking librarian who oversees (among other things) the Chinese section of her library, as well as someone I know who does typesetting in both Japanese and Arabic (and is also fluent in Chinese, Hebrew and Yidish). When asked about rtl sideways-left inside vertical CJK, the general response was "Hmmm. Nope, don't think I've ever seen that."

I did find one Chinese calligraphy artist who does a fusion of the Chinese and Arabic styles, and he does have some (lovely) samples of vertical-rl/sideways-left.

http://www.hajinoordeen.com/gallery/UF-M-028.jpg
http://www.hajinoordeen.com/gallery/UF-G-004.jpg
http://www.hajinoordeen.com/gallery/SL-T-017.jpg

But this is sufficiently far out of mainstream that it does not count as evidence there's an actual need. I am sure that my research can be considered lousy, and that we could certainly turn up less extreme examples. But I've at least convinced myself that this was indeed sufficiently rare thing, not worth significant complications to the whole spec.

And if we're not going to support that, fantasai's new design is better.

TL;DR: I agree with fantasai.

 - Florian

Received on Monday, 6 July 2015 15:04:45 UTC