Re: rotate attribute on tspan

Thierry,

For reference purposes, here is the description of the 'rotate' attribute from
the Dec3 spec:

===START OF EXTRACTION FROM SPEC===
rotate = "auto | <number>+" 

A value of auto causes all characters to be oriented as specified by other
text
attributes without any supplemental rotation. 
If a single <number> is provided, then this value represents a supplemental
rotation about the current text position that will be applied to each glyph
corresponding to each character within the 'tspan' element. 
If a comma- or space-separated list of <number>s is provided, then the first
<number> represents the supplemental rotation of the first character, the
second <number> represents the supplemental rotation of the second character,
and so on. If more <number>s are provided than there are characters, then the
extra <number>s will be ignored. If more characters are provided than
<number>s, then the extra characters will be rotated by the last <number> in
the list. 
This supplemental rotation has no impact on the rules by which current text
position is modified as glyphs get rendered. 
The default value is "auto". 
===END OF EXTRACTION FROM SPEC===

I can see that more detail and a picture would help.

The way to think about this is that there is a glyph that is about to be drawn
at a certain point on the canvas. The glyph is defined  within its own
coordinate system. 

Without the rotate attribute, to make it draw at the correct location on the
canvas and in the correct size, there are a series of transformation matrices
that need to be applied to the glyph. These transformations matrices will
scale
the glyph coordinates to the correct size, rotate the glyph to the correct
orientation, flip the glyph (usually) because fonts almost always have their
y-axis pointing up whereas SVG has its y-axis pointing down, and then
translate
(i.e., move) the glyph so that the glyph's origin is aligned exactly with the
correct position on the canvas (the "current text position").

When you add in the rotate attribute, you add one more transformation matrix.
This one rotates the glyph about its origin after the origin has been aligned
with the current text position. For Roman characters, the glyph origin is
almost always at the left side of the glyph at the bottom of the uppercase
characters. 

Sorry, pictures take time, so I don't have one to send you right now.


Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated


At 05:29 PM 2/25/00 +0100, Thierry Kormann wrote:
>Hi,
>
>I don't really understand what the rotate attribute
>on a tspan element should do. I have read that
>only the current text position is rotated. 
>
>Does it means that the glyph is not rotated ?
>Could there be some additional details about how
>to implement this feature or maybe a screenshot 
>that illustrates this behaviour will help.
>
>Thanks for your help.
>Thierry.
>
>-- 
>Thierry Kormann
>email: Thierry.Kormann@sophia.inria.fr  http://www.inria.fr/koala/tkormann/
>Koala/Dyade/Bull @ INRIA - Sophia Antipolis
>  

Received on Friday, 25 February 2000 17:04:12 UTC