2

I have 2 svgs that look exactly the same on the web and in Illustrator. One of them has been run through a minify script.

You can take a look at these 2 svgs and the code on codepen: http://codepen.io/drw158/pen/OVrryz

As you can see, the main difference is that the commas have been removed and the decimal places have been rounded.

Does anyone have an idea why Sketch would misplace the vectors points for this svg? Whenever I open the .svg file in Sketch, it looks like this:

Messed up icon

Sketch is the only program I have that displays this svg like this.

Here is the code for the 2 svgs:

Regular svg

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0z" />
<path d="M12,4c2.209,0,4,1.791,4,4s-1.791,4-4,4c-2.209,0-4-1.791-4-4S9.791,4,12,4z M12,20c0,0,8,0,8-2c0-2.4-3.9-5-8-5 s-8,2.6-8,5C4,20,12,20,12,20z" />
</svg>

Minified

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0z" />
<path d="M12 4c2.21 0 4 1.79 4 4s-1.79 4-4 4-4-1.79-4-4 1.79-4 4-4zm0 16s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2z" />
</svg>
3
  • 1
    You'll need to ask the folks developing Sketch.
    – Scott
    Aug 4, 2015 at 17:19
  • I linked to this post in the official Sketch Facebook group. The post is currently pending admin approval. The Bohemian Coding developers are pretty active there, so I'm hoping we can get an answer. I've been wondering the same questions myself.
    – spjpgrd
    Aug 4, 2015 at 19:12
  • Both EPS and SVG are bad formats for file transfer. They contain too many features related to hand crafting. In any case i allways wonder why anybody in their sane mind would want to really work with svg. The data us not well suited for tagging. Hell path tag attribute d is PDF, which is just mangled postscript. Surely we can make selectors work in a more suitable architecture. But yes i do use svg, just dont enjoy it, EPS is much more descriptive but even that sucks as a transfer format.
    – joojaa
    Aug 5, 2015 at 5:59

1 Answer 1

0

Sketch has always been a little iffy with SVGs, especially the Layer > Combine tools... I would just report it as a bug through Sketch, with screenshots if possible. They seem to respond to them well.

One other thing you can do, is download the Beta version to see if they fixed your issue: http://bohemiancoding.com/sketch/beta/

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