Text-anchor property

 

Hello www-svg,

 

The text-anchor property seems to be under specified. Specifically, what
does the "start of the text string", "middle of the text string" and
"end of the text string" mean?

 

If you look at the 'textLength' attribute in the specification:

 

textLength = "<length>
<http://www.w3.org/TR/SVG/types.html#DataTypeLength> " 

The author's computation of the total sum of all of the advance values
that correspond to character data within this element, including the
advance value on the glyph (horizontal or vertical), the effect of
properties 'kerning'
<http://www.w3.org/TR/SVG/text.html#KerningProperty> , 'letter-spacing'
<http://www.w3.org/TR/SVG/text.html#LetterSpacingProperty>  and
'word-spacing' <http://www.w3.org/TR/SVG/text.html#WordSpacingProperty>
and adjustments due to attributes dx
<http://www.w3.org/TR/SVG/text.html#TSpanElementDXAttribute>  and dy
<http://www.w3.org/TR/SVG/text.html#TSpanElementDYAttribute>  on this
'tspan' <http://www.w3.org/TR/SVG/text.html#TSpanElement>  element or
any descendants. This value is used to calibrate the user agent's own
calculations with that of the author.

.....

 

Is this definition also intended to be used when determining where the
string shall be rendered when used with 'text-anchor'?

 

In the newly published test suite, there is a test (text-text-05-t.svg)
that expects that the last glyph's horizontal advance shall not be
included in the layout calculations. What is the expected value for this
calculation? The glyphs advance (except the last glyph) plus the last
glyph's path bounding box width (which will be changed when rotation is
applied)?

 

Regards,

Niklas Hagelroth

Received on Tuesday, 19 December 2006 14:31:39 UTC