textLength and text-anchor question...

Hello,

I have 2 questions regarding proper text and tspan implementations.
Question 1:
	How is "textLength" supposed to be calculated (w3c specs dont show
any formula) e.g. are character widths multiplied by font size when added
together with kerning and other spacing attributes?

Question 2:
	What is the right implementation of "text-anchor" within "tspan"?
According to W3C specs:
"The 'text-anchor' property is applied to each individual text chunk within
a given 'text' element. Each text chunk has an initial current text
position, which represents the point in the user coordinate system resulting
from (depending on context) application of the x and y attributes on the
'text' element, any x or y attribute values on a 'tspan', 'tref' or
'altGlyph' element assigned explicitly to the first rendered character in a
text chunk, or determination of the initial current text position for a
'textPath' element."

Thus the svg below should render text "Text2" over "Text1", however
according to Adobe SVG viewer 2.0 (build 55) which supposedly has all
text-anchor features implemented, it renders "Text2" right after "Text1"
(effectively ingoring text-anchor attrib).  Am I missing something?

  <text  x="200" y="50">Text1
  <tspan text-anchor="end">Text2</tspan></text>


Thanks for your help.
-peter

Received on Sunday, 29 April 2001 19:10:01 UTC