Jump to content

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

Share this post


Link to post
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" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
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" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
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" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
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

Share this post


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

Share this post


Link to post
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" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
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

Share this post


Link to post
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" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
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

Share this post


Link to post
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 online2long.gif
Affinity Designer 1.6.4.104 • Affinity Photo 1.6.4.104 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.6.8.77 • Affinity Designer for iPad 1.6.1.40 • iOS 11.4.1 (iPad Air 2)

Share this post


Link to post
Share on other sites

Or simply use the Pie Tool to create both shapes

 


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
Share on other sites
3 minutes ago, firstdefence said:

Or simply use the Pie Tool to create both shapes

 

Easy as pie! doh.gif


Alfred online2long.gif
Affinity Designer 1.6.4.104 • Affinity Photo 1.6.4.104 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.6.8.77 • Affinity Designer for iPad 1.6.1.40 • iOS 11.4.1 (iPad Air 2)

Share this post


Link to post
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" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
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 online2long.gif
Affinity Designer 1.6.4.104 • Affinity Photo 1.6.4.104 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.6.8.77 • Affinity Designer for iPad 1.6.1.40 • iOS 11.4.1 (iPad Air 2)

Share this post


Link to post
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" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
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 online2long.gif
Affinity Designer 1.6.4.104 • Affinity Photo 1.6.4.104 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.6.8.77 • Affinity Designer for iPad 1.6.1.40 • iOS 11.4.1 (iPad Air 2)

Share this post


Link to post
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" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
Share on other sites

The support you get here is worth the license cost alone.

I didn't know about the donut tool. I'm not a designer or used to work with these kind of applications, I learn as I go. I got tired of really ugly symbols used in other applications so I started making my own.

Share this post


Link to post
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" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


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

Share this post


Link to post
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 online2long.gif
Affinity Designer 1.6.4.104 • Affinity Photo 1.6.4.104 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.6.8.77 • Affinity Designer for iPad 1.6.1.40 • iOS 11.4.1 (iPad Air 2)

Share this post


Link to post
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" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Illustrator CC, Affinity Designer/Photo, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
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

Share this post


Link to post
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 online2long.gif
Affinity Designer 1.6.4.104 • Affinity Photo 1.6.4.104 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.6.8.77 • Affinity Designer for iPad 1.6.1.40 • iOS 11.4.1 (iPad Air 2)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×