SVG Text and TSpans Import
Hello all,
I'm having issues with AI importing a SVG file.
I need to preserve the original texts and tspans after importing a svg file.
A file was created by exporting an AI document into a SVG file (SVG 1.0). The option "Preserver AI capabilities" is checked off, because the SVG is later modified by a different system.
Once the modified SVG is imported, the texts and tspans are all messed up in a very inconsistent manner.
There is a simple way to reproduce the issue doing the following steps:
1 - Create a sample file, write a text that breaks to different lines
2 - Export ai file to SVG.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="1920px" height="1080px" viewBox="0 0 1920 1080" enable-background="new 0 0 1920 1080" xml:space="preserve">
<text id="Lorem_ipsum_dolor_sit_amet_consectetur" transform="matrix(1 0 0 1 421.4561 260.877)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="24px">Lorem ipsum</tspan><tspan x="0" y="28.8" font-family="'ArialMT'" font-size="24px">dolor sit</tspan><tspan x="0" y="57.6" font-family="'ArialMT'" font-size="24px">amet consectetur</tspan></text>
</svg>
3. close and open the exported SVG. No need to modify the SVG.
4. Export the file again as another SVG file (file #2)
The tspans are gone and now all became texts.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="1920px" height="1080px" viewBox="0 0 1920 1080" enable-background="new 0 0 1920 1080" xml:space="preserve">
<text transform="matrix(1 0 0 1 421.4561 260.877)" font-family="'ArialMT'" font-size="24px">Lorem ipsum</text>
<text transform="matrix(1 0 0 1 421.4561 289.677)" font-family="'ArialMT'" font-size="24px">dolor sit</text>
<text transform="matrix(1 0 0 1 421.4561 318.477)" font-family="'ArialMT'" font-size="24px">amet consectetur</text>
</svg>
