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

Improve SVG stringification #10

Open
2 of 6 tasks
staticintlucas opened this issue May 3, 2024 · 0 comments
Open
2 of 6 tasks

Improve SVG stringification #10

staticintlucas opened this issue May 3, 2024 · 0 comments

Comments

@staticintlucas
Copy link
Owner

staticintlucas commented May 3, 2024

  • Improve SVG path output
    • Is 3 decimal digits enough? With 1000 dots-per-key this will have a resolution of 19.05 nm, while with 5 digits we have 0.1905 nm. Either seems excessive TBH (implemented in c17fd05)
    • Improve stringification, for example a line currently produces "l10 -50" while we could do "l10-50". printf supports the "% f" format which inserts a ' ' or '-', but rust doesn't seem to have an equivalent (implemented in c17fd05)
    • Currently we use absolute moves and relative everything else, but in some cases the opposite would produce smaller output. Is it worth implementing some logic to optimise this?
  • Have an option to toggle between pretty printed and compressed output? (see also: Allow for custom formatting bodoni/svg#68)
    • Could we generate pretty output and then use a library to compress the output? How inefficient is this approach?
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