Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG-File-Error #13

Closed
lukasoppermann opened this issue May 7, 2014 · 12 comments
Closed

SVG-File-Error #13

lukasoppermann opened this issue May 7, 2014 · 12 comments
Assignees
Labels

Comments

@lukasoppermann
Copy link

Hey I noticed that some icons are broken like this:
screen shot 2014-05-07 at 14 43 41

I do not get the problem working with https://github.com/FWeinb/grunt-svgstore with the same icons. This plugin saves every in a group -tag. Maybe this would solve it?

@jkphl
Copy link
Collaborator

jkphl commented May 7, 2014

hey @lukasoppermann,

I don't know grunt-svgstore, so please tell me if that also does optimize the SVG files?!

Please try disabling SVG optimization altogether first, then try tweaking the SVGO settings (plugins). I know there are some edge cases where SVGO cripples files, but this is not an iconizr bug. If SVGO turns out to be the cause, and if you've got some time, you could try to reproduce an isolated case with SVGO only and file an issue there?!

Pls let me know ...

Cheers,
Joschi

@lukasoppermann
Copy link
Author

Hey, I do not think it does optimization, I will try this and get back to you, thanks.

Okay, I just checked if I use cleanwith: 'NULL' I still have the same error. Its only on 2 icons though, not on all.

@stefanjudis
Copy link

@lukasoppermann which optimizer are you using with grunt-svg-sprite.

I'm using SVGO without it all the time and I'd say it's a bug over in this project. :)
It happens sometimes - couldn't figure out yet, when exactly...

@jkphl
Copy link
Collaborator

jkphl commented May 7, 2014

Hi @stefanjudis,

I didn't say it's necessarily a bug. I just made the experience that some SVGO plugins are too agressive for some SVG files, resulting in crippled files.

@lukasoppermann Please make sure to use cleanwith (not cleanwidth) as parameter name. If the problem remains, please send me the SVG files in question via email and I'll see what I can do as soon as I am back in Germany.

Thanks guys, cheers,
Joschi

@stefanjudis
Copy link

👍

Please report progess. ;)

@jkphl
Copy link
Collaborator

jkphl commented May 7, 2014

Sure! :)

@lukasoppermann
Copy link
Author

That was just a typo on github, not in the GruntFile though. I sent you the file via email, hope you have more luck, thanks.

@jkphl
Copy link
Collaborator

jkphl commented May 23, 2014

Note to myself (and for the sake of completeness) — this is the image in question:

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
     x="0px" y="0px" width="512px" height="512px" viewBox="0 0 512 512" xml:space="preserve">
<path d="M253.875,102.4C94.822,102.4,0,250.982,0,250.982S96.947,409.6,256,409.6s256-160,256-160S412.928,102.4,253.875,102.4z
     M254.848,345.6c-49.485,0-89.6-40.115-89.6-89.6s40.115-89.6,89.6-89.6s89.6,40.115,89.6,89.6S304.333,345.6,254.848,345.6z"/>
</svg>

@jkphl jkphl added the bug label May 26, 2014
@jkphl jkphl self-assigned this May 26, 2014
@jkphl
Copy link
Collaborator

jkphl commented May 27, 2014

Hey @lukasoppermann (and @stefanjudis),

I finally found the time to work on this specific issue. As expected, this seems to be an issue with an overly aggressive SVGO plugin. Please try this as configuration with the given sample file:

{
    /* ... */
    // cleanwith: 'svgo',
    cleanconfig: {
        plugins: [
            {convertPathData: false}
        ]
    }
}

The sample SVG file should renders just fine then, right?

If you find the time, please head over to SVGO and file an issue there (possibly referencing this one here).

Thanks & cheers,
Joschi

@jkphl jkphl closed this as completed May 27, 2014
@jkphl
Copy link
Collaborator

jkphl commented May 27, 2014

Sorry, forgot to mention: Additionally, there has been a bug in the svg-sprite sources that prevented the SVGO plugin configuration to be properly merged with the default values. This will be fixed with the next release.

@lukasoppermann
Copy link
Author

Awesome, thank you. 👍

jkphl added a commit that referenced this issue May 29, 2014
Added new HTML output format for rendering an inline SVG HTML
implementation (#12)
Added new SVG output format for rendering an inline SVG sprite (#12)
@jkphl
Copy link
Collaborator

jkphl commented May 29, 2014

Fixed as of release 17c721a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants