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

absolute coordinates add 10~20% to size, consider optimizing path strings #94

Open
anthrotype opened this issue Sep 22, 2020 · 1 comment

Comments

@anthrotype
Copy link
Member

After I rebuild our test color-fonts using latest nanoemoji and picosvg in googlefonts/color-fonts#11, I noticed that the OT-SVG fonts that embed SVGs converted through picosvg (--color_format=picosvg/picosvgz) are now between 10 to 20 % bigger. I think this is a result of picosvg now always converting coordinates to absolute, for all paths, not just those that need to be simplified for various reasons (e.g. processing with other tools like skia-pathops).

Maybe as an optional optimization picosvg could make path d strings more compact by using relative coordinates, as well as reducing whitespace between path commands to the mimimum, and similar other size optimizations.

@rsheeter
Copy link
Collaborator

@EsoHasInsomnia was asking about using picosvg for shrinking svgs which is somewhat related. A shrink mode is worth at least considering.

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