I draw a 1000px horizontal line in illustrator CS5, put a text on the path and drag the starting point to 250px.
Illustrator translates the "startOffset"-Attribute of the text-node to something around 32% rather than the expected 25%.
Also and as expected, when displaying the SVG in Firefox or any capable browser the position of the text is not the same as in illustrator.
Does anyone know the reason for this behaviour or if it is a bug? If not, is there a workaround to get the text positioned correctly in the SVG?
Thank you for your help!
AI thinks in inches and point and DPI matters a lot... Check your document settings. Also you approach will generally be problematic as it doesn't produce proper persistent coordinates and a simple difference in rendering the referenced font would result in a different placment of the text... Move the text element in its entirety if this is critical...
Hey Mylenium, thanks for your quick answer.
Units might be a lead, I will look at that...
As for positioning: When I correct the startOffset value to 25% (according to the example above) manually in the svg file, the text is actually displayed at the correct starting point, just like in the illustrator file.
So, it seems that, really, AI interprets this value differently (in a sort of exponential way) than browsers (in a linear way).
I could go with single tspan elements with absolute coordinates distributed along the path, but performance in the browser seems to be lower and the text is harder to work with...
Found a solution myself:
If anybody is facing the same issues: