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

Recommended Posts

I've just started using Affinity Designer and so far I love it. When I export to SVG I get weird results. Circles get look like they are partially inside a black box, croped objects does not look croped. If I export to EPS everything looks fine.

It also depends a bit on the app I use to view the SVG file. Finder in MacOS shows the SVG file as I expect when I preview them. But a bunch of other application does not. Please see the attached image. The symbol to the right is EPS and looks like it should. The symbol to the left is SVG and that's how it looks i most applications when I import it.

I'm nor very familiar with SVG, I know there are different versions. Are there settings somewhere I could try or is this a bug?

Screen Shot 2018-04-19 at 16.18.39.png

Link to comment
Share on other sites

SVG code can be written differently by different apps, just download a few SVG files and open with a text editor and you will se the code looks different.

 

It would help if you shared the design file and also told us which apps open the SVG improperly.

 

I've just created the same graphic and saved using File > Export... > SVG for export: Test.svg Try this with your apps.

 

This is the code for the test.svg...

<?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 337 337" 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-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
    <g transform="matrix(1,0,0,1,-121.456,-219.255)">
        <circle cx="289.793" cy="387.591" r="158.337" style="fill:rgb(235,235,235);stroke:black;stroke-width:20px;"/>
        <g transform="matrix(1,0,0,1,-1.18441,10.5)">
            <path d="M189.662,357.612L392.293,357.612" style="fill:none;stroke:black;stroke-width:20px;stroke-linecap:butt;"/>
        </g>
        <path d="M349.154,368.112C351.168,374.243 352.257,380.791 352.257,387.591C352.257,422.066 324.268,450.055 289.793,450.055C255.318,450.055 227.329,422.066 227.329,387.591C227.329,380.791 228.418,374.243 230.431,368.112L349.154,368.112Z" style="fill:rgb(235,235,235);stroke:black;stroke-width:20px;stroke-linejoin:miter;"/>
    </g>
</svg>

 

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

This is the code for the same image created in Sketch:


<svg width="420px" height="420px" viewBox="0 0 420 420" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <!-- Generator: Sketch 49.1 (51147) - http://www.bohemiancoding.com/sketch -->
    <desc>Created with Sketch.</desc>
    <defs></defs>
    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <circle id="Oval" stroke="#979797" stroke-width="20" fill="#D8D8D8" cx="210" cy="210" r="200"></circle>
        <path d="M143.489254,192 L277.510746,192 C279.133294,197.890327 280,204.093949 280,210.5 C280,248.88379 248.88379,280 210.5,280 C172.11621,280 141,248.88379 141,210.5 C141,204.093949 141.866706,197.890327 143.489254,192 Z" id="Combined-Shape" stroke="#9B9B9B" stroke-width="20" fill="#D8D8D8"></path>
        <path d="M110,191 L310,191" id="Path-2" stroke="#979797" stroke-width="20"></path>
    </g>
</svg>

 

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

I've found 2 apps I use that open the file improperly; Omnigraffle and Logoist3, regardless of which app they are from Affinity or Sketch they both open the file like these...

 

Logoist 3

5ad8d8d568c53_ScreenShot2018-04-19at18_58_25.png.d84ee1fd418f9e6983f3243a55500265.png

 

Omnigraffle.

5ad8d89e28151_ScreenShot2018-04-19at18_55_49.png.74cf2a29a3fb9bc6aa3c89f7a0c2e4b1.png

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

Omnigraffle is one app I tested, that's were the screenshots are from. The other is GNS3, a virtualization app for network engineers. The symbols I've created was intended to use with that application. I have not tested any other so far. I have a license for Illustrator CS5.5 (yeah, old), I tried importing the EPS there and make a SVG file that way, but the result was either the same or a terrible looking image.

The SVG file is rather large, almost 100 KB, I attach it instead of pasting text.

 

camera_dome.svg

Link to comment
Share on other sites

When I opened both files in Inkscape, both files look fine, as expected.

If I open the files in Designer, Test.svg is fine, but not camera_dome.svg. On the right side, how Inkscape "cut"/display the objects.

It looks like a bug with Designer. Perhaps you can use commanline to convert your files with Inkscape in an appropriate format for GNS3, until this is fixed ? (It would be faster than opening and saving them).

Some screenshots of my tests (3rd one with clipping mask).

 

2018-04-19_223133.png

2018-04-19_222816.png

2018-04-19_222617.png

 

PS. Each time Inkscape displayed the correct image.

Link to comment
Share on other sites

I have saved this file with history so you can scroll back in the History Panel to see how this was done: SVG Works in all apps.afdesign exporting this to SVG imports to Omnigraffle and Logoist correctly. The main difference with this file is I created the bar as a rectangle not a path, I also joined that rectangle to the inner circle so it becomes a single entity.

test 3.svg

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

Awesome help guys, much appreciated!

I have tried making a single entity but I seem to do something wrong. When I union the two curves I don't get the result I want. The bar usually gets white or the circle gets filled and un-croped and I cant change that. This is how I do it:

  1. Create two circles, one smaller than the other.
  2. Subtract the smaller one from the bigger one
  3. Crop the circle
  4. Draw a bar and position it
  5. Union the two objects.

I tried to walk through the steps firstdefence did but I cannot follow it completly (I lack experience). I have attached the apdesign file.

EDIT: Re-did the whole thing and it worked like I expected. So that's nice but I noticed that all the layers are preserved in the SVG file, making it difficult to move around in for example omnigraffle. If i flattern the image it will be rasterised. Is there a way around this? Combining the objects does not seem to work, I get the same kind of results as earlier, with objects being wrong color/disappearing.

camera_dome.afdesign

Link to comment
Share on other sites

The way I demo in this gif I have only 2 layers left so I don't know whether that is better...

5ada1ba7bf805_CamDrone.thumb.gif.553c8e370ac5ffc808ccee87a1492ab7.gif

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

I think I got the hang of it now. I can see a few bugs here and there, it's easier to restart that fixing the ones I've already messed around with. I have re-done about 30 symbols so far and every one has exported like expected.

I do get stuck on what I suspect is bugs. Look at the pictures below. The green circle is a curve, created bu two circles where one is stbstracted from the other. The Circle sector is on top. Subtract those two and unexpected results happen.

 

Screen Shot 2018-04-26 at 07.48.56.png

Screen Shot 2018-04-26 at 07.49.16.png

Link to comment
Share on other sites

28 minutes ago, ecce said:

The green circle is a curve, created by two circles where one is subtracted from the other.

 

If you use the Donut Tool instead of the Ellipse Tool, you won’t need to perform a subtraction to create it.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

Or simply use the Pie Tool to create both shapes

 

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

Using the Pie Tool  5ae17735ac08a_ScreenShot2018-04-26at07_52_17.png.16010394dd1ebf6153563993383915ed.png to be Awesome on a sunny Spring morning...

Using the Pie tool.mp4

 

5ae177e6ecae9_ScreenShot2018-04-26at07_55_10.png.7d321709e4fcccfc64db3163f21aa843.png

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

Why not use two pies rather than three, and avoid all that resizing and ‘Geometry’ manipulation? Instead of giving the duplicate a heavy stroke and no fill, leave it filled (with no stroke) and just drag the central node out towards the edge to create the crust of the pie. That’s what I thought you had in mind before I saw your video.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

Just now, Alfred said:

Why not use two pies rather than three, and avoid all that resizing and ‘Geometry’ manipulation? Instead of giving the duplicate a heavy stroke and no fill, leave it filled (with no stroke) and just drag the central node out towards the edge to create the crust of the pie.

Morning Alfred, I was showing how you could create the image ecce was trying to achieve, so duplicating the shape prior to a boolean subtract gives you the shape that already fits and saves having to recreate it.

This is about SVG's and if you don't get the shapes right they will import into other apps incorrectly. It may be that this shape would work fine but I've found that SVG's are a law unto themselves and the code that goes with them is just messy and open to interpretation by any software app that can import them.

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

2 minutes ago, firstdefence said:

duplicating the shape prior to a boolean subtract gives you the shape that already fits

 

But it doesn’t already fit, or you wouldn’t have to shrink the stroked shape down to the size of the filled shape! Point taken about the behaviour of SVGs, though. :)

 

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

With hind-sight one can always "streamline" a process but efficiency was not the reason for the video, the reason for the video was to show how it "could" be done, I'm sure there are quite a few varied ways that are far more efficient than mine but as I was leaving the house so efficiency wasn't a prerequisite. :)

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

10 minutes ago, ecce said:

I didn't know about the donut tool.

Firstdefence's Disclaimer: The Doughnut Tool cannot be eaten and you should not attempt to chew the screen O.o Licking the screen will also not work as the delicious Doughnut Tool is not sugar coated :D (as far as I am aware)  In order to save confusion, I would suggest thinking of the succulent, delicious and dunkable Doughnut Tool as the more official title: Torus Tool, this will save you being dragged away by men in white coats ;)

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

2 minutes ago, firstdefence said:

Firstdefence's Disclaimer: The Doughnut Tool cannot be eaten and you should not attempt to chew the screen O.o Licking the screen will also not work as the delicious Doughnut Tool is not sugar coated :D (as far as I am aware)  In order to save confusion, I would suggest thinking of the succulent, delicious and dunkable Doughnut Tool as the more official title: Torus Tool, this will save you being dragged away by men in white coats ;)

Too late.

Link to comment
Share on other sites

4 minutes ago, firstdefence said:

In order to save confusion, I would suggest thinking of the succulent, delicious and dunkable Doughnut Tool as the more official title: Torus Tool, this will save you being dragged away by men in white coats ;)

 

The thing is, a torus is 3D whereas an Affinity Donut is only 2D. Not nearly as tasty! :P

 

I wonder whether those nice people at Flickr have just recently discovered the difference. :/

 

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

1 minute ago, Alfred said:

I wonder whether those nice people at Flickr have just recently discovered the difference. :/

 

I think they're a bit smug about it all ¬¬

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

If I use the donut tool I get another SVG export problem. There is no hole in it once it's imported to omnigraffle for example. Screenshots shows affinity designer, the preview in finder and the filled dot is the SVG imported in omnigraffle.

 

Screen Shot 2018-04-27 at 09.19.23.png

Screen Shot 2018-04-27 at 09.20.17.png

Link to comment
Share on other sites

2 minutes ago, ecce said:

If I use the donut tool I get another SVG export problem. There is no hole in it once it's imported to omnigraffle for example.

 

Does the problem persist if you select the donut and ‘Convert to Curves’?

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

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.