I'm using Inkscape to convert text to path elements in SVG files. I'm generating SVG <textPath> elements and until now it's been working fine. Now I want to be able to distribute the text characters evenly along the path, expanding the whitespace without resizing the characters. I can do this in SVG using the textLength and lengthAdjust properties of my <textPath> and it renders nicely in a browser (here's a demo) but when I open in Inkscape these properties are ignored and the text is left aligned.
I've tested these properties on a <text> element and it does render as expected, but then I can't put the text on a path.
Is it possible to achieve what I'm trying here using Inkscape?
I have in the past used these parameters on a <text> element which has been applied to a path.
Browsers focus on just making things work. Sometimes things which are not correct according to the current specification may work in a browser, if they are simply just trying to 'make things work'
It's important to note that <text> elements or any related element may not display in the same way on different target systems.
Normally for SVG to ensure maximum visual compatibility ( to ensure that what you have made displays in the exact same way on a target system ) an 'object-to-path' operation is carried out.
That way the text is converted to paths and is independent of installed fonts or text rendering on the target system.
I wrote an extension a long time ago to adjust the parameters of textLength and lengthAdjust etc in Inkscape for <text> elements ( so they could be adjusted on a path )
As mentioned, conversion to path is the only way to ensure 'exact' rendering over multiple target systems.
Thanks for your reply. I have now resolved to trying to build a text-to-path system using javascript that will allow me to accurately position characters anywhere along the path - character positioning is not as easy as I'd hoped!
I'm using Inkscape to convert text to path elements in SVG files. I'm generating SVG
<textPath>
elements and until now it's been working fine. Now I want to be able to distribute the text characters evenly along the path, expanding the whitespace without resizing the characters. I can do this in SVG using thetextLength
andlengthAdjust
properties of my<textPath>
and it renders nicely in a browser (here's a demo) but when I open in Inkscape these properties are ignored and the text is left aligned.I've tested these properties on a
<text>
element and it does render as expected, but then I can't put the text on a path.Is it possible to achieve what I'm trying here using Inkscape?
It's a good question.
I have in the past used these parameters on a <text> element which has been applied to a path.
Browsers focus on just making things work. Sometimes things which are not correct according to the current specification may work in a browser, if they are simply just trying to 'make things work'
It's important to note that <text> elements or any related element may not display in the same way on different target systems.
Normally for SVG to ensure maximum visual compatibility ( to ensure that what you have made displays in the exact same way on a target system ) an 'object-to-path' operation is carried out.
That way the text is converted to paths and is independent of installed fonts or text rendering on the target system.
I wrote an extension a long time ago to adjust the parameters of textLength and lengthAdjust etc in Inkscape for <text> elements ( so they could be adjusted on a path )
As mentioned, conversion to path is the only way to ensure 'exact' rendering over multiple target systems.
Thanks for your reply. I have now resolved to trying to build a text-to-path system using javascript that will allow me to accurately position characters anywhere along the path - character positioning is not as easy as I'd hoped!