1

I am using Adobe Illustrator to generate SVG files. However, I find that when I try to export a textual element with multiple lines, that element is exported as svg paths, not svg text elements. If the textual element DOES contain a single line, the export works as expected.

multi line example

This Adobe Illustrator text element has multiple lines. It is exported into svg path elements. Example:

<g id="dupe_MFG_PKG:_12.13.21_BATCH:_210001392_UID:_1A4060300002EE1000024872" data-name="dupe MFG/PKG: 12.13.21 | BATCH: 210001392UID: 1A4060300002EE1000024872">
          <path class="cls-1" d="M.29.9h.4L1.34,3,2,.9h.4V5.1H2.05V1.78L1.35,4h0l-.7-2.2V5.1H.29Z" transform="translate(-0.29 -0.49)"/>
    ....

single line example

This Adobe Illustrator text element has a single line. It is exported into svg text elements. Example:

<g id="Layer_26" data-name="Layer 26">
          <text class="cls-1" transform="translate(0 10.3) scale(1 1.01)"><tspan class="cls-2">L</tspan><tspan x="3.34" y="0">o</tspan><tspan class="cls-3" x="7.73" y="0">r</tspan><tspan class="cls-4" x="10.38" y="0">em ipsum</tspan></text>
    ...

I need the export to preserve all text. What can be done to achieve this? I'd prefer not to enforce constraints on the designer ("Please make sure each text element is a single line") but I'm otherwise forced to "break up" the design doc OR manually recreate the svg by hand.

2
  • Has the text in the fist example been altered? Transformed? Appearance changed in any way? Does it interact with other objects with appearance alterations?
    – Scott
    Jan 26, 2022 at 19:24
  • I can't reproduce the problem. Sorry.
    – Billy Kerr
    Jan 26, 2022 at 19:33

1 Answer 1

1

By experimentation, I was able to find the culprit: improper control characters. I used this tool: https://www.soscisurvey.de/tools/view-chars.php and found the 0x03 or ctrl+C where a cr lf characters ought to have been. The solution is very simple- from Adobe, backspace over the incorrect invisible 0x03 white-space and then hit return to replace it with the correct characters.

1
  • While I've never hit this issue specifically, for years I've been asking Adobe to fix the random whitespace character at the end of multi-line text in all their applications. It will also throw off centering at times (more prominently in InDesign).
    – Scott
    Jan 26, 2022 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.