Jump to content

Use of textLength and lengthAdjust in SVG

Recommended Posts

Hi,I tried the following code but can not get the result of textLength and lengthAdjust. Why? I created the SVG file and opened it with the browser (explorer, firefoz, chrome) but I get the same result.

<?xml version="1.0" encoding="UTF-8" ?><svg version="1.1" xmlns="http://www.w3.org/2000/svg"><g style="font-size: 14pt;">  <path d="M 20 10 20 70 M 220 10 220 70" style="stroke: gray;"/>  <text x="20" y="30" textLength="200" lengthAdjust="spacing">Two words</text>  <text x="20" y="60" textLength="200" lengthAdjust="spacingAndGlyphs">Two words</text>  <text x="20" y="90">Two words <tspan style="font-size: 10pt;">(normal length)</tspan></text>  <path d="M 20 100 20 170 M 100 100 100 170" style="stroke: gray;"/>  <text x="20" y="120" textLength="80" lengthAdjust="spacing">Two words</text>  <text x="20" y="160" textLength="80" lengthAdjust="spacingAndGlyphs">Two words</text></g>	</svg>


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...