Re: [css3-writing-modes] bidi in vertical writing modes

On 07/13/2011 05:56 PM, Alex Danilo wrote:
> ...
>
> Attempting to implement to the letter of the current working draft not only made my
> head sore, but produced this comment in my source code (you can make of that
> whatever you like):
>
> /**
>   *  Set the insertion position for the current box and
>   *  take into account BIDI processing for ordering placement.
>   *
>   *  Note, this is assuming the UAX#22 mappings for RTL and LTR
>   *  for the vertical right-to-left layout. If we are to support
>   *  Ogham in here which goes BTT then the logic would be pretty
>   *  much the same as for RTL. //ZZ extend for BTT.
>   *  (UAX#22 skips over detail in regard to embedding level
>   *  placement, so other sources need to be consulted to get
>   *  the expected behaviour).
>   *
>   *  Importantly, UAX#22 says to do the mappings for the Scripts
>   *  from UAX#24, map them and then run the BIDI algorithm to get
>   *  ordering. That's misleading. The bulk of the BIDI algorithm
>   *  is in resolving numbers, white-space etc. from the 19 UAX#9
>   *  classifications to get an embedding level (even or odd). Then
>   *  the glyph ordering gets swapped based on the embedding levels.
>   *  In UAX#22 what is meant is that this last part of BIDI -
>   *  namely swapping based on even/odd embedding be done in the
>   *  vertical direction. So it's really only the final step in
>   *  BIDI that needs to be done. _Very_ confusing!
>   *
>   *  i.e. LTR == TTB, RTL == BTT.
>   */
>
> This is from an implementer, and my last comment in the comment is "_Very_ confusing!"
> and not as a result of reading the email threads on this list at all.

Firstly, it's UTN22, not UAX22. UTN22 is not a spec and it is not normative.
As an implementer, you should not be using UTN22 for anything other than
background information.

> But at the moment, if I see punctuation in a Latin context I let it inherit the script of the
> identified surrounding text which determines it's orientation. That seems to be the
> intention of the working draft and matches what a bunch of people have said on this
> list in various emails. Funnily enough it produces good results.

The current working draft actually doesn't say anything about using context to determine
the orientation of punctuation...

> Also, the code comment above is my personal interpretation and it also handles
> mixing actual BIDI code-points in a rotated vertical setting, something that is
> not addressed by the current writing-modes draft.

Bidi should be fully handled by the current writing-modes draft. Please explain
in what ways it is not.

For your reference, the relevant sections are listed below:
   http://dev.w3.org/csswg/css3-writing-modes/#text-direction
   http://dev.w3.org/csswg/css3-writing-modes/#text-orientation
   http://dev.w3.org/csswg/css3-writing-modes/#line-directions

~fantasai

Received on Friday, 15 July 2011 00:00:00 UTC