- From: Kari Pihkala via GitHub <sysbot+gh@w3.org>
- Date: Thu, 15 Sep 2016 07:52:19 +0000
- To: public-svg-issues@w3.org
The [SVG Text Layout
algorithm](https://svgwg.org/svg2-draft/text.html#TextLayoutAlgorithm)
describes how x, y, dx, dy, rotate and startOffset interact:
* First, the step 6 “Adjust positions: x, y” calculates _result.x_
coordinates for the characters from the x attributes.
* Then, the step 8 “Position on path” calculates the position on path
(_mid_) from _result.x_ and _startOffset_: “_mid_ is _x_ + _advance_ /
2 + _offset_”
So, _x_ and _startOffset_ (both) should affect the position of text on
text path.
Firefox gives the same result as Chrome and Webkit if the x attribute
is moved to a tspan:
```
<text>
<textPath xlink:href="#myTextPath" startOffset="50%"><tspan
x="5">|</tspan></textPath>
</text>
```
In this case, the SVG2 text algorithm actually treats the x attribute
in `<text>` the same way as in `<tspan>`. Firefox seems to have a bug
if the x attribute is in `<text>`.
--
GitHub Notification of comment by karip
Please view or discuss this issue at
https://github.com/w3c/svgwg/issues/265#issuecomment-247261068 using
your GitHub account
Received on Thursday, 15 September 2016 07:52:27 UTC