Optimising svg paths #816
Replies: 2 comments
-
Ooh nice work! I've been wanting to build an SVG optimizer based on lightning css for parsing style attributes, markup5ever, etc. for a while but haven't had time to work on it. Really cool to see. Yes, it would be awesome to integrate a path optimizer for clip-path etc. As long as it's available as an independent crate without too many additional dependencies I'd love to use it in Lightning CSS! |
Beta Was this translation helpful? Give feedback.
-
Love to hear it. Right now there's only two essential dependencies for paths: bitflags and ryu. |
Beta Was this translation helpful? Give feedback.
-
Hello lightningcss folks, I'm writing a little svgo clone in Rust. I've been using lightningcss for various optimisations there already and I was really hoping that it also had something for optimising paths.
Obviously it doesn't, when parsing something like a
clip-path
withpath(...)
I think I recall it being parsed asUnparsed
orCustom
or something like that.But anyway, I'm not here to complain. I ended up writing my own path optimiser. I always like giving back, so I'm here to ask if it'd be worth building this out more so you can use it.
I'm trying to structure it out so it could eventually be a crate and if I can get it properly tested and reasonably stable I can come help y'all integrate it.
You can check out the path optimiser here, and if you want an example of it being used you can take a look here.
Beta Was this translation helpful? Give feedback.
All reactions