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

minify --svg-decimals=3 adds artifacts to a certain .svg file #230

Closed
shlomif opened this issue Oct 20, 2018 · 4 comments
Closed

minify --svg-decimals=3 adds artifacts to a certain .svg file #230

shlomif opened this issue Oct 20, 2018 · 4 comments

Comments

@shlomif
Copy link
Contributor

shlomif commented Oct 20, 2018

When running the latest minify against this svg - https://github.com/shlomif/vim-begin/blob/master/vim-begin/vim-begin-logo/Vim-begin-logo.svg - I am getting this - https://vim.begin-site.org/images/vim-begin.min.svg with an artefact added - as displayed by all of FF, chromium-browser and gwenview. Please look into fixing it and thanks for a great program.

@tdewolff
Copy link
Owner

tdewolff commented Oct 24, 2018

For future reference. The offending piece is at the third m move command:

<path d="
m400.031 561.219-5.313 4.563-5.313 14.875 4.063 4.063h16.406l4.281-4.313 4.563-15.656-3.531-3.531z
m-30.063 41.938-2.031 8.063h11.375l-24.5 69.969h34.844l2.281-7.344h-9.594l24.25-70.688z
m110.875.25 1-22.969h-12.625l-8.063-8.344h-27.531l-2.531 7.563h9.094l-23.5 69.219h29.313l2.25-6.594h-6.813l15.406-48.469h29.063l-17.188 55.063h28.281l2.531-6.063h-6.813l15.656-49.25h27.781l-17.438 55.313h31.063l2.531-6.594h-7.844l19.219-62.375-5.813-7.813H527.063l-7.344 8.063h-13.375l-7.594-8.313z"/>

Original:

<path d="
m 400.03125,561.21875 -5.3125,4.5625 -5.3125,14.875 4.0625,4.0625H 409.875 l 4.28125,-4.3125 4.5625,-15.65625 -3.53125,-3.53125 z
m -30.0625,41.9375 -2.03125,8.0625 h 11.375 l -24.5,69.96875 h 34.84375 l 2.28125,-7.34375 h -9.59375 l 24.25,-70.6875 z
m 110.875,0.25 L 473.25,612 h -12.625 l -8.0625,-8.34375 h -27.53125 l -2.53125,7.5625 h 9.09375 l -23.5,69.21875 h 29.3125 l 2.25,-6.59375 h -6.8125 L 448.25,625.375 h 29.0625 l -17.1875,55.0625 h 28.28125 l 2.53125,-6.0625 h -6.8125 l 15.65625,-49.25 h 27.78125 l -17.4375,55.3125 h 31.0625 l 2.53125,-6.59375 H 535.875 l 19.21875,-62.375 -5.8125,-7.8125 H 527.0625 l -7.34375,8.0625 h -13.375 l -7.59375,-8.3125 z"/>

EDIT: it is the L 473.25,612 that gets converted into 1-22.969 (implied lowercase L) instead of about -8 9. Bad tracking of position from previous M?

@tdewolff
Copy link
Owner

Thanks for the bug report! Should be fixed now.

@shlomif
Copy link
Contributor Author

shlomif commented Oct 26, 2018 via email

@shlomif
Copy link
Contributor Author

shlomif commented Oct 26, 2018 via email

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

No branches or pull requests

2 participants