W3C home > Mailing lists > Public > www-svg@w3.org > August 2000

Re: Rotating Text in http://www.w3.org/TR/2000/CR-SVG-20000802/text.html

From: Jon Ferraiolo <jferraio@Adobe.COM>
Date: Mon, 28 Aug 2000 15:45:03 -0700
Message-Id: <>
To: "chris elliott" <cje2@biolpc22.york.ac.uk>
Cc: <www-svg@w3.org>
What really happens in SVG is that the coordinate system gets rotated 
first, and then the text is rendered into the new coordinate system.


<text x="0" y="0" transform="rotate(30)">Rotated text</text>

is equivalent to:

<g transform="rotate(30)">
   <text x="0" y="0">Rotated text</text>

Think of the X and Y axes rotating about the origin by 30 degrees 
clockwise. Tilt your head by 30 degrees also to line up with these new 
axes, and then render the text at the (0,0) point in this new coordinate 
system. The text is rendered upright relative to the new, rotated 
coordinate system.

For normal European text, text is positioned such that the left edge of the 
first glyph is placed at the coordinate specified by the 'x' attribute, and 
the Roman/alphabetic baseline of the glyph is placed at the coordinate 
specified by the 'y' attribute, where 'x' and 'y' are in the new, rotated 
coordinate system.

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated

At 09:40 AM 8/23/00 +0100, chris elliott wrote:

>In the section about rotating text,
>http://www.w3.org/TR/2000/CR-SVG-20000802/text.html, it seems very vague
>about which point the text should be rotated. Could it not be made more
>explicit? My interest comes from trying to write a windows -> SVG converter,
>where MS windows always rotates the text about the top left corner of the
>characters, whereas the SVG start is approximately the bottom left corner,
>though as the text rotates, it seems as though the rotation point may also
>shift. So far I have only tried to deal with ASCII characters
>Any clarification appreciated
Received on Monday, 28 August 2000 18:45:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:49 UTC