Sensotix Posted April 2, 2020 Posted April 2, 2020 (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 April 2, 2020 by Sensotix Quote
Dan C Posted April 9, 2020 Posted April 9, 2020 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! Sensotix 1 Quote
Recommended Posts
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.