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

Switch off SVGO Absolute for SVG / JS distribution Repos / Packages #5554

Open
OlivierLDff opened this issue Oct 2, 2020 · 4 comments
Open
Assignees
Labels
Bug A bug in an icon glyph or a first-party library.

Comments

@OlivierLDff
Copy link

Wasn't sure where to put that or who to contact.

I'm embedding into my app all icons as svgs for easy and fast developement.
I discovered a tool call svgo that optimize svg by removing meta data.

I created a github repo that mirror Templarian/MaterialDesign with optimized svg. https://github.com/OlivierLDff/MaterialDesignSvgo.

Binary size of the icon collection is reduced by half.

I want to share this repo, as it might be useful to people doing like me.

@Templarian
Copy link
Owner

We already run SVGO on all of the icon data. Can you give some examples of path data you're seeing reduced?

Make sure you're running it with 2 decimals of precision. If you have it set to round all decimals it will cause issues in some icons.

@Templarian Templarian added the Needs More Info Request needs more information or example images. label Oct 2, 2020
@Templarian
Copy link
Owner

Definitely see the difference. SVGO is configured to use absolute path data in all scenarios. This was a requirement in our legacy system to build the webfont, but we can switch it off for the SVG / JS repos after extensive testing.

Renaming your issue to point this out.

@Templarian Templarian added Bug A bug in an icon glyph or a first-party library. and removed Documentation Needs More Info Request needs more information or example images. labels Oct 2, 2020
@Templarian Templarian changed the title Optimized svgs repo Switch off SVGO Absolute for SVG / JS distribution Repos / Packages Oct 2, 2020
@Templarian Templarian added this to the Next Major - 6.0.xx milestone Oct 2, 2020
@Templarian
Copy link
Owner

@OlivierLDff I've tagged this for the 6.0 milestone. Not too much effort on our part, but requires extensive testing to ensure we don't cause any icon regressions. One of the underlying libraries 7 years ago had glitchy results with relative path data. Definitely not an issue with the latest @mdi/font-build package.

@mririgoyen
Copy link
Sponsor Collaborator

@Templarian We need to verify this as we approach v6 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in an icon glyph or a first-party library.
Projects
None yet
Development

No branches or pull requests

3 participants