Jump to content
You must now use your email address to sign in [click for more info] ×

Designer SVG export (empty groups)


Recommended Posts

Hi all I have attached a simple file as an example - in Designer 2 I have three layers with font text, one layer with a rectangle and no groups. When I export the file to SVG it seems that I have an empty group for each text layer. The SVG file displays ok in the browser but I don't want useless clutter in my SVG files. Can anyone please tell me why am I getting these empty groups or how can I stop them?

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 400 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
    <rect x="50" y="20" width="50" height="50" style="fill:rgb(13,202,242);"/>
    <g transform="matrix(50,0,0,50,310.289,181.133)">
    </g>
    <text x="124.058px" y="181.133px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:50px;">Houston</text>
    <g transform="matrix(50,0,0,50,249.972,116.383)">
    </g>
    <text x="94.308px" y="116.383px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:50px;">Boston</text>
    <g transform="matrix(50,0,0,50,257.422,55.791)">
    </g>
    <text x="46.191px" y="55.791px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:50px;">New <tspan x="159.204px 187.964px 215.771px " y="55.791px 55.791px 55.791px ">Yor</tspan>k</text>
</svg>

 

ad2-svg.jpg

text-test-261122.afdesign

Link to comment
Share on other sites

I am not sure what you mean by empty text layers. You have the words New York and Boston and Houston in the SVG file.

950420960_ScreenShot2022-11-26at11_06_20AM.png.17f6e5c14484971008c3406eacf350cb.png

Mac Pro (Late 2013) Mac OS 12.7.2 
Affinity Designer 2.3.1 | Affinity Photo 2.3.1 | Affinity Publisher 2.3.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

1 minute ago, Old Bruce said:

I am not sure what you mean by empty text layers. You have the words New York and Boston and Houston in the SVG file.

950420960_ScreenShot2022-11-26at11_06_20AM.png.17f6e5c14484971008c3406eacf350cb.png

I mean the g (group) elements are empty see below for example - the group opens and then closes with nothing inside it - also as you can see in my AD screenshot I have no groups in the layers panel so where are these groups coming from?

<g transform="matrix(50,0,0,50,310.289,181.133)">
    </g>
Link to comment
Share on other sites

Just now, Brian_J said:

@Palatino When I save the file with Flatten transforms disabled, I still get empty groups.

Yep:

image.png.e40985037a6b866315d4f8fefbdaf4aa.png

 1) You have completely wrecked the layers panel, Serif.

2) I recommend Reddit groups instead of this forum. Not the same few bot-like users replying to everything, a wider representation of users, fewer fanboys, more qualified users. In short, better!

3) I was here to report bugs and submit improvement requests for professional work professionally in a large setup and to bring a lot of knowledge from the world, i.e. professional product development, web- and software development, usability, user experience design and accessibility. I actually know what I am talking about!

BUT! We are phasing out Designer and Affinity in 2022 Q1 - and replacing it with feature complete and algorithmically competent alternatives.
Publisher is unsuitable for serious use, and was never adopted.

Link to comment
Share on other sites

1 minute ago, Juc1 said:

Yes you can see in my original screenshot above that "Flatten transforms" is already checked.

Yes, I overlooked that. Designer V1:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 400 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
    <rect x="50" y="20" width="50" height="50" style="fill:rgb(13,202,242);"/>
    <text x="124.058px" y="181.133px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:50px;">Houston</text>
    <text x="94.308px" y="116.383px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:50px;">Boston</text>
    <text x="46.191px" y="55.791px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:50px;">New <tspan x="159.204px 187.963px 215.771px " y="55.791px 55.791px 55.791px ">Yor</tspan>k</text>
</svg>

 

Thanks to DeepL.

Link to comment
Share on other sites

5 minutes ago, Palatino said:

Yes, I overlooked that. Designer V1:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 400 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
    <rect x="50" y="20" width="50" height="50" style="fill:rgb(13,202,242);"/>
    <text x="124.058px" y="181.133px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:50px;">Houston</text>
    <text x="94.308px" y="116.383px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:50px;">Boston</text>
    <text x="46.191px" y="55.791px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:50px;">New <tspan x="159.204px 187.963px 215.771px " y="55.791px 55.791px 55.791px ">Yor</tspan>k</text>
</svg>

 

Yeah that is how I would expect the SVG file to look - so it looks like a V2 bug ?

Link to comment
Share on other sites

18 minutes ago, Brian_J said:

v1 code is clean,

Well, it could be a bit nicer: 😉

<?xml version="1.0" encoding="utf-8"?>
<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 400 200" xmlns="http://www.w3.org/2000/svg">
    <rect fill="#0dcaf2" height="50" width="50" x="50" y="20"/>
    <g font-family="ArialMT, Arial, sans-serif" font-size="50">
        <text x="124.06" y="181.13">Houston</text>
        <text x="94.308" y="116.383">Boston</text>
        <text x="46.191" y="55.791">New York</text>
    </g>
</svg>

 

Thanks to DeepL.

Link to comment
Share on other sites

On a side note re my original screenshot above why does Designer break up words like "New York" into "New", "Yor" and "k" - which then need multiple x y coordinates? I know this can be turned off in svg export options with longer text spans but what is the benefit / point of doing it, why is breaking up words even an option? why would anyone want words broken up in their SVG?

Link to comment
Share on other sites

19 hours ago, Juc1 said:

On a side note re my original screenshot above why does Designer break up words like "New York" into "New", "Yor" and "k" - which then need multiple x y coordinates? 

Could be due to some kerning applied in the original.

Mac Pro (Late 2013) Mac OS 12.7.2 
Affinity Designer 2.3.1 | Affinity Photo 2.3.1 | Affinity Publisher 2.3.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
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.
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.