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

Offer path minification #2

Open
ccprog opened this issue Oct 22, 2020 · 0 comments
Open

Offer path minification #2

ccprog opened this issue Oct 22, 2020 · 0 comments

Comments

@ccprog
Copy link
Owner

ccprog commented Oct 22, 2020

Please do not comment yet. This is only a short draft before going to be bed.

Offer optimization of path data.

Do not use svgo, it is evil. Only the EBNF of SVG1.1 is the meausre of success. (In case you missed it, the EBNF in SVG2 has been simplified in a way that is unhelpful.)

  • boolean minification
  • superfluous z if start and end are identical and there is a L H V at start or end. Moving the start point if neccessary and possible.
  • If it is in any way doable, get back to A if it is a conversion to C. Yes, I know it was a lossfull conversion in the first place. But I know I can do it by hand and with a good eye. And yes, it may proove impolssible.
    What is more interesting is proof whether it really shortens the string.
  • correcting obviously wrong viewBox. The same comment as above applies.

dev-badge.svg
dev-badge-a.svg
dev-badge-svgomg.svg

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

1 participant