W3C home > Mailing lists > Public > www-svg@w3.org > September 2008

Re: [1.2T-LC] Lack of BIDI 'direction' (ISSUE-2058 ACTION-2201)

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 18 Sep 2008 13:36:28 -0700
Message-ID: <48D2BBCC.2050007@inkedblade.net>
To: Doug Schepers <schepers@w3.org>
CC: www-svg <www-svg@w3.org>

Doug Schepers wrote:
> Hi, fantasai-
> 
> The SVG WG discussed this issue, and we agree that your issue makes sense.
> 
> SVG1.1 Full does support the 'direction' property. [1] The challenge for
> SVG 1.2 Tiny user agents is that they frequently rely upon the
> underlying platform's text rendering engine for the directionality of
> text.  Even when the underlying platform does support right-to-left
> text, it doesn't always allow the user agent to dictate when the
> directionality is switched; for example, the UA might not be able to
> make English text go right-to-left.

'direction' cannot make English text go right-to-left without a
'unicode-bidi: bidi-override' setting.

> We are reluctant to include optional features in SVG.  We are more
> comfortable with making conditional features.  While we are looking more
> into this issue, we have a tentative proposal we'd like your feedback on.
> 
> Would the CSS WG be comfortable if we introduced the 'direction'
> property, but included the proviso that it's platform-dependent?

No, I don't think so. It doesn't make any sense for 'direction' to be
"platform-dependent".

> As a side note, since 'direction' has no effect unless 'unicode-bidi' is
> 'embed' or 'bidi-override', we would also have to include that property.
>  (Just curious, why is this dependency here in CSS?  Why can 'direction'
> not apply no matter what the circumstances?  Unless there is a clear and
> common use case when 'direction' should not apply directly, it would
> seem easier and more intuitive for authors.)

Ah, this is where the misunderstanding is. The 'direction' property does
have an effect without 'unicode-bidi' when it is set at the paragraph
(not inline) level. It sets the base direction of the paragraph (in bidi
terms). Changing the base direction of the paragraph affects reordering
within a paragraph. For example
   <p style='direction: ltr'>This is a sentence.</p>
   <p style='direction: rtl'>This is also a sentence.</p>
Will render as
   This is a sentence.
                                  .This is also a sentence
It affects text-align, of course, but note also the position of the period.

I am not suggesting that SVG Tiny include the 'unicode-bidi' property.
But you do need to include the 'direction' property or its equivalent.

The platform should allow changing the base direction of the text it's
being told to render. If it doesn't and it uses UAX14's heuristic,
then you have a problem, because UAs that support 'direction' won't be
using that heuristic when 'direction' is not present, they'll be using
'ltr'.

~fantasai
Received on Thursday, 18 September 2008 20:37:10 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:40 GMT