Jump to content

Recommended Posts

Posted (edited)

We encountered two issues with SVG export. We have the use case of mass-producing svg-files by keeping text placeholders in a template SVG and bulk replace them by our software.

1. Artistic Text Tool: Text alignment (left, center, right) is not exported with "text-anchor" in the output svg, which means that whenever the text length is changed the alignment is lost. Here, we try to center-align item CUSTOM1:

<g id="CUSTOM1" transform="matrix(1,0,0,1,-30.4781,4.61505)">
  <text x="153.616px" y="10.977px" style="font-family:'Futura-Bold', 'Futura', sans-serif;font-weight:700;font-size:7px;">CUSTOM1</text>
</g>

2. Frame Text Tool: Text alignment is lost as well, but what is worse is that AD introduces a tspan within (!) the text in the resulting svg whenever a text-alignment is selected on this item in AD, e.g. when trying to right-align CUSTOM2:

<g id="CUSTOM2" transform="matrix(1,0,0,1,8.0584,4.77075)">
  <text x="140.334px" y="25.41px" style="font-family:'Futura-Medium', 'Futura', sans-serif;font-weight:500;font-size:7px;fill:rgb(255,21,234);">CUST<tspan x="157.8px 164.055px " y="25.41px 25.41px ">OM</tspan>2</text>
</g>

with the original text being "CUSTOM2". That renders the item useless for our purposes and we have to manually adjust the SVG prior to bulk processing.

 

We would expect the following output:

<g id="CUSTOM1" transform="matrix(1,0,0,1,-30.4781,4.61505)">
  <text x="153.616px" y="10.977px" text-anchor="middle" style="font-family:'Futura-Bold', 'Futura', sans-serif;font-weight:700;font-size:7px;">CUSTOM1</text>
</g>
<g id="CUSTOM2" transform="matrix(1,0,0,1,8.0584,4.77075)">
  <text x="140.334px" y="25.41px" text-anchor="end" style="font-family:'Futura-Medium', 'Futura', sans-serif;font-weight:500;font-size:7px;fill:rgb(255,21,234);">CUSTOM2</text>
</g>

 

Edited by Sensotix
Posted

Hi @Sensotix,

Welcome to the forums and my sincerest apologies for the delayed response :)

As I'm not personally familiar with the 'ins-and-outs' of SVG coding I passed this through to our developers, who responded with the following:

Quote

The customer is correct. Currently we are more focused on positioning the text so it matches the view in the app than we are on preserving the alignment after someone edits the generated SVG. The <tspan> happens when the text spacing in the app differs too much from the SVG default. There is an export option, 'Longer text spans' which relaxes the tolerance and should help with that.

Better support for your use case would be a reasonable feature request.

For this reason, I'll be moving your thread to the Feedback section of the forums.

I hope this helps!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.