Closed Bug 665822 Opened 9 years ago Closed 7 years ago
SVG does not honor text
Path start Offset attribute if the text Path contains a tspan
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Per the w3c spec, SVG textPath elements have a startOffset attribute which can be used to set a (relative or absolute) start point for the text along the path. If the textPath contains a <tspan> element, Firefox does not honor the startOffset attribute on the parent <textPath>, and instead begins the text at the start of the path. Reproducible: Always Steps to Reproduce: 1. Create a path in SVG 2. Create a textPath along this path, with startOffset set to 50% 3. Enter text in the textPath - it should render correctly (beginning halfway along the path) 4. Wrap the above text in a <tspan> (with no attributes) - it will now render incorrectly, at the beginning of the path Actual Results: Text begins at the beginning of the path Expected Results: Text should begin halfway along the path See attachments for test cases.
Thanks for the minimal testcase Adam. Worth their weight in gold those are :-)
Confirmed against Mozilla/5.0 (Windows NT 5.1; rv:7.0a1) Gecko/20110621 Firefox/7.0a1 ID:20110621030803
OS: Mac OS X → All
Version: unspecified → Trunk
It's the whitespace before the start of the textPath node that causes the problem. Remove this and it will centre correctly.
Status: NEW → RESOLVED
Closed: 7 years ago
Depends on: svgtext
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.