-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Optimize and fix up some SVGs #80119
Optimize and fix up some SVGs #80119
Conversation
abf53b8
to
c2aa71f
Compare
I think you meant 5 KB? 😛 |
c2aa71f
to
dbd3949
Compare
Fixed! |
1cf41c2
to
401e3a2
Compare
ed6cba8
to
963f456
Compare
Of course this went on to become more of a dumping ground for more tweaks and improvements, so it's more like 8 kB now. |
963f456
to
4046609
Compare
4046609
to
93318d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected. Icons still look fine in the editor.
Binary sizes before/after (Linux x86_64, stripped debug editor build):
170,677,168 godot.linuxbsd.editor.x86_64.master
170,669,360 godot.linuxbsd.editor.x86_64.pr
Thanks! |
Addresses some icons I missed in my SVG optimization PRs. A few of them are small fix-ups, like tiny lines in the middle of arcs or unintentional elliptical arcs where they meant to be circlular. This saves about 5 kB.
Also I changed the opacity of some icons slightly. Many icons used alphas like 50 or 100. When doing 50/255 for example, it can get thrown off and become something like 0.19608 when opened in an editor. The alpha values 51, 102, 153, and 204 result in no precision inconsistencies (as they are 0.2, 0.4, 0.6, 0.8) so I used them where the change isn't noticeable. Even if it's noticeable, it's probably for the better, as some people have complained about low opacity icons. Where not applicable (e.g. an alpha value of 20, which isn't close to any of these), I changed to use at most 3 digits of precision.
^ I don't think this needs to be enforced strictly, it's just a nice thing to do once IMO, and also artists probably often copy the opacity of existing icons. (or maybe it's just me doing things like that? 😅)