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

multiply viewBox by 10 to get rid of decimal notation #39

Closed
Danny-Engelman opened this issue Nov 26, 2021 · 1 comment
Closed

multiply viewBox by 10 to get rid of decimal notation #39

Danny-Engelman opened this issue Nov 26, 2021 · 1 comment

Comments

@Danny-Engelman
Copy link

Danny-Engelman commented Nov 26, 2021

Not sure if this is a SVGMO option.

If this viewBox="0 0 160 160" is multiplied by 10, all path notations will be a lot shorter

<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 160">
<path d="M27.2 145.7c4.8.2 12.9.2 18 0 5.1-.1 1.2-.3-8.7-.3-9.9 0-14.1.2-9.3.3zm86.5 0
c5.1.2 13.5.2 18.6 0 5-.1.9-.3-9.3-.3-10.2 0-14.3.2-9.3.3z" fill-opacity=".09"/>
<g stroke-width="0"><path d="M75 13.7c-6.2 3.2-7.8 10-3.5 15.2l2.6 3-3.3 2.5
c-1.8 1.4-6.1 4.6-9.5 7.1C47.3 51.8 40 63 40 74c0 7.3 2.2 12.3 9 20.9 5.7 6.9 5.9 8.5 2.9 
16.7-2.6 6.8-2.1 7.4 6.4 7.4 6.2 0 6.8.7 3.6 3.6-1.8 1.6-4.2 2-18.3 2.4-9.1.3-17 1.1-18.1 1.7-5.4 3-10.6 12-9.2 15.7.6 1.5 2.8 1.7 22.9 1.4 21.4-.3 22.5-.4 27.1-2.8 4.5-2.2 9.3-6.8 12.5-11.6 1.2-1.9 1.2-1.
9 2.5.1 3 4.9 10.6 11.3 15.2 12.9 7.2 2.4 46.3 2.4 47.2 0
@tomayac
Copy link
Owner

tomayac commented Nov 29, 2021

This was proposed in svg/svgo#293. The TL;dr is that it's something that unfortunately cannot be automated and risks breaking SVGs. I'm closing the present issue, but feel free to discuss further on the referenced thread of course.

@tomayac tomayac closed this as completed Nov 29, 2021
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