Open karip opened 8 years ago
I agree, the algorithm should be fixed to work according to current browser behavior.
Not blocking updated 2.0 CR publication - assigning 2.1 WD milestone
I encountered this issue recently.
My workaround is to assume <textPath>
has x="0" y="0"
by default.
The SVG Text Layout Algorithm doesn’t work correctly if
<text>
has multiple<textPath>
elements. Here’s an example: https://jsfiddle.net/x8eug31n/Browsers display this correctly, ‘ABC’ and ‘DEF’ are at the start of their respective paths. The issue is that the SVG Text Algorithm calculates the positions on path wrong. Here’s why:
I'm using the term 'approximately' here, because the glyph advance also affects the text position on path. But that isn't relevant to this issue.
The algorithm should be modified to work correctly with multiple textPaths to reflect the current browser behaviour, or have a note saying that this is a breaking change.