ISSUE-2299 (startoffset_textanchor): Text on a path layout rules unclear wrt startpoint-on-the-path and text-anchor [SVG Full 1.1]

ISSUE-2299 (startoffset_textanchor): Text on a path layout rules unclear wrt startpoint-on-the-path and text-anchor [SVG Full 1.1]

http://www.w3.org/Graphics/SVG/WG/track/issues/2299

Raised by: Erik Dahlström
On product: SVG Full 1.1

Trying to work out the correct behavior for the following testcase:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 <path id="tp" d="M50 100c100 400 400 -100 600 200" fill="none" stroke="black"/> 
 <text x="200"><textPath xlink:href="#tp" text-anchor="middle" startOffset="50%">hello world</textPath></text> 
</svg>

I think the spec may be in conflict with itself (from text-on-a-path layout rules):

[[
Before rendering the first glyph, the horizontal component of the startpoint-on-the-path is adjusted to take into account various horizontal alignment text properties and attributes, such as a dx attribute value on a 'tspan' element. (In the picture above, the startpoint-on-the-path is the leftmost dot on the path.)
]]

and furthermore:

[[
When the inline-progression-direction is horizontal, then any x attributes on 'text', 'tspan', 'tref' or 'altGlyph' elements represent new absolute offsets along the path, thus providing explicit new values for startpoint-on-the-path.
]]

Now, should x="200" be the startpoint-on-the-path, or should it be an offset from the startpoint-on-the-path (startOffset=50%), should it be ignored, or should it be handled in some other way?

It seems we have at least three different behaviors in current UA:s.

[1] http://dev.w3.org/SVG/profiles/1.1F2/publish/text.html#TextpathLayoutRules

Received on Tuesday, 20 October 2009 21:53:07 UTC