-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
floatPrecision should ignore gradient stops #1828
Labels
Comments
Not so sure that it should. E.g. you would want instead of something like 0.66667 to use .67. Zero digits is actually quite extreme setting, though it can have it uses. |
I was just comparing output from this library vs https://svgomg.net. On svgomg I do get a benefit of of smaller filesize when setting precision to 0 and still having intact gradients. |
would solve your issue by passing floatPrecision: {
default: 0,
offset: 2
} Alternatively floatPrecision: {
d: 0, // for paths, d="M123 456 789..."
points: 0 // for polygons
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I noticed that when setting floatPrecision to 0, it will totally mess up gradient stops.
It does work well on path/shapes position precision optimization, but not so well on gradient stops.
Perhaps we could have a flag to exclude or set separate floatPrecision for gradient stops?
before
after
The text was updated successfully, but these errors were encountered: