Re: Bidi space Q&A

Richard, the css spec is the CSS 2.1 draft pointed to from our Q&A:
http://www.w3.org/Style/Group/css2-src/text.html#q8

Ian, thanks but I understand the bidi algorithm, my question was really about
CSS. How do I use the natural directionality of the text, when inserting any
html or xhtml element applies a direction of ltr, rtl, or one inherited from
its parent? (Which is what the CSS 2.1 spec suggested be done...)

I guess I am suggesting there should be a way to set the element to use the
direction of the text, perhaps by adding a direction of none.

The alternative I guess, and maybe what the spec is suggesting, is to know the
direction of the characters and only apply elements that have the same
direction as the text. What a silly and tremendous burden to have insert
elements only because the underlying text is changing script.

To answer your last question, the information in the CSS 2.1 draft spec is
incorrect if the element has unicode-bidi:embed set, the levels are different.
The space will not travel to the front of the B. Therefore the spec should say
that the description is accurate only if unicode-bidi:normal, the same way it
points out white-space:normal must be set.

tex

Ian Hickson wrote:
> 
> On Sat, 5 Jul 2003, Tex Texin wrote:
> >
> > "Note that there are two spaces between A and B, and none between B and C.
> > This is best avoided by using the natural bidirectionality of characters
> > instead of explicit embedding levels."
> >
> > Can someone explain this to me?
> 
> Below, CAPITALS represent hebrew characters and lowercase represents
> latin1 characters, as per the UNICODE convention, and [LRE], [RLE], and
> [PDF] represent the relevant bidi characters (U+202A to U+202C). The
> latter are equivalent to using markup with "dir" attributes or the
> 'direction' property in CSS. The numbers underneath represent the
> embedding levels.
> 
>    english [RTL] HEBREW [PDF] english
>    11111111     22222222     11111111
> 
> ...vs:
> 
>    english HEBREW english
>    1111111122222211111111
> 
> Both are given in a context with a block 'direction' of 'ltr'.
> 
> The former would render as:
> 
>    english  WERBEHenglish
>    1111111122222221111111
> 
> ...while the latter would render as:
> 
>    english WERBEH english
>    1111111122222211111111
> 
> See, e.g.:
> 
>    http://www.damowmow.com/playground/demos/bidi/001.html
> 
> > I understand that neutral-directionality characters in between strong
> > characters inherit their direction. However, with css, direction is
> > either ltr, rtl, or inherited.
> 
> The CSS directions are equivalent to explicit UNICODE bidi formatting
> characters (U+202A to U+202E). See the bidi algorithm for more details on
> how direction-neutral characters inherit their direction from the
> surrounding characters:
> 
>    http://www.unicode.org/reports/tr9/tr9-11.html#Resolving_Neutral_Types
> 
> > 3) Just an aside, I think we need to tell the CSS folks to say that
> > unicode-bidi has to be normal for their spec to be precise. We didn't
> > need to say it because we ruled out CSS from the question.
> 
> I don't understand what this means.
> 
> Cheers,
> --
> Ian Hickson                                      )\._.,--....,'``.    fL
> "meow"                                          /,   _.. \   _\  ;`._ ,.
> http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

-- 
-------------------------------------------------------------
Tex Texin   cell: +1 781 789 1898   mailto:Tex@XenCraft.com
Xen Master                          http://www.i18nGuy.com
                         
XenCraft		            http://www.XenCraft.com
Making e-Business Work Around the World
-------------------------------------------------------------

Received on Saturday, 5 July 2003 14:12:35 UTC