Re: interpretation of rotate= attribute

On Monday, April 18, 2005, 10:20:41 PM, bulia wrote:

bb> In both 1.1 and 1.2 Mobile draft, the rotate= attribute on text
bb> elements is described thus:

bb> ----------
bb>       The supplemental rotation about the alignment-point that will be
bb> applied to all of the glyphs corresponding to each character within
bb> this element.
bb>       If a comma- or space-separated list of <number>s is provided,
bb> then the first <number> represents the supplemental rotation for the
bb> glyphs corresponding to the first character within this element or any
bb> of its descendants, the second <number> represents the supplemental
bb> rotation for the glyphs that correspond to the second character, and
bb> so on.
bb> ----------

bb> Here, the first paragraph seems to apply to the case when rotate= has
bb> a single number, and seems to specify that in this case, _all_
bb> characters in an element are rotated by that angle.

bb> But this is hard to reconcile with the second paragraph. Indeed if a
bb> single value is considered a list of length one, then it naturally
bb> must apply only to the first character, not to all characters. So if
bb> we follow the spec literally, then in

bb> <text rotate="30">ABC</a>

bb> C is rotated, whereas in 

bb> <text rotate="30 30">ABC</a>

bb> it's not. This is terribly inconsistent. It becomes even worse if you
bb> consider the "if not specified for this char, inherit from ancestors"
bb> provision.

bb> As a result of this confusing requirement, there's already a
bb> discrepancy among implementations: Batik renders all letters rotated
bb> when rotate= has a single value, whereas the Adobe SVG plugin rotates
bb> only the first one. I think Adobe's interpretation makes a lot more
bb> sense, but it seems to be contradicted by the spec.

bb> Could you please make sure this is sufficiently clarified in the 1.2 draft?

We have now clarified this. The text in the spec is:

>> A comma- or space-separated list of <number>s must be provided
>> provided. The first <number> specifies the supplemental rotation that
>> must be applied to the glyphs corresponding to the first character
>> within this element or any of its descendants, the second <number>
>> specifies the supplemental rotation that must be applied to the
>> glyphs that correspond to the second character, and so on.

>> If more <number>s are provided than there are characters, then the
>> extra <number>s must be ignored.

>> If more characters are provided than <number>s, then for each of
>> these extra characters the rotation value specified by the last
>> number must be used.

>> This supplemental rotation must have no impact on the rules by which
>> current text position as glyphs get rendered.

In consequence, in the case where the list of rotations is of length 1
(a  single rotation), all the characters rotate. Batik is thus correct
here.

Please let us know within two weeks if this does not sufficiently
clarify this part of the spec.

-- 
 Chris Lilley                    mailto:chris@w3.org
 Chair, W3C SVG Working Group
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG

Received on Monday, 31 October 2005 16:55:25 UTC