- From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
- Date: Mon, 15 Nov 2010 14:48:15 +0100
- To: www-svg@w3.org, ddailey@zoominternet.net
>Different browsers seem to have different ideas for where to put the rotated >text inside a tspan. At the current text position and rotate around the current text position? ;o) 'rotate = "<number>+" The supplemental rotation about the current text position that will be applied to all of the glyphs corresponding to each character within this element...' http://www.w3.org/TR/SVG11/text.html#TSpanElementRotateAttribute >See http://srufaculty.sru.edu/david.dailey/svg/newstuff/text6.svg (sorry >about the claim that only IE/ASV handles dy="1em" -- that was true in 2007! >and I haven't had a chance to revise the code) but note how FF and the >others place the rotated text at different positions. 1em makes a difference, if this means other user coordinates at the end. For example due to other fonts or other default font-sizes. Maybe better to test this with user coordinates first to see, if there is a problem with the attribute interpretation or the unit or waht you expect about the unit size. >But I'm not sure why we can't use an animateTransform on one of these >puppies. Then the glyph would be rotated either around the origin of the user coordinate system or around the manually provided rotation center and you need a new syntax to animateTransform lists of glyphs, because there can be a rotation for each glyph within the tspan separately. To use the transform attribute (additionally), the text element is available. For tspan you can use lists of x, y, dx, dy to manipulate the current text position - but indeed to get a simple method to rotate about a certain point, you need typically one shift before and one after the rotation. One method to do this could be the advanced font approach from SVG 1.1 using path elements or basic shapes to represent the glyph. For these shapes it is no problem to animate every element of the glyph separately - and the animated glyph should be automatically positioned with the text/tspan approach. I think, the tspan attributes are more intended for simpler applications. About the current status of declarative animation of 'rotate' of tspan (SVG 1.1): According to my test suite one gets best results with Squiggle 1.7 (6/8) or with Opera 9.50 to 10.0 (5/8) and not very impressive are Opera 9 or 10.6 (1/8 or 2/8 depending on the exact version). For others like KSVG1, WebKit 528.16, Adobe plugin, Opera 8 I get 0/8. It think, there is not stable/final version of a gecko (Firefox etc) yet to test animation. In the average the implementation status for the animation of tspan rotate is not very impressive. But there is no big difference to rotate of the text element. Olaf
Received on Monday, 15 November 2010 14:23:55 UTC