-
Notifications
You must be signed in to change notification settings - Fork 49
Added SVG version of Fabric logo. #101
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
base: main
Are you sure you want to change the base?
Conversation
|
This PR has been blocked for 7 months now, because the |
I'm not a maintainer, so I don't think I can fix that. I'll get a maintainer to check in. |
Gamebuster19901
left a comment
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.
I’m not a maintainer, but I don’t see the point of this.
What is the point of a .svg if it takes up 20x as much space, and there is otherwise no benefit? The fabric logo 485 bytes, this is 9.89kb.
You don’t even get the scalability benefit from a .svg because the logo can already be scaled as nearest neighbor without looking bad.
Minecraft doesn’t read .svg anywhere.
Additionally if the logo ever changes, this would have to be updated, and most people don’t have a .svg editor.
As far as I can tell, there is nothing simpler about this, as a 16x16 png is basically as simple as it gets.
|
I was going to say that SVGs can be optimized by being handwritten as opposed to being generated by a tool, but after taking a look at the SVG, I have only one question: why is there a PNG embedded inside this SVG? |
|
Maybe I’m being paranoid, but I think we should treat this file as potentially suspicious until it’s been thoroughly examined. .svg files can include embedded scripts or payloads, and the size of this file seems unusually large for something based on a 16×16 png. I’m NOT trying to suggest anything malicious on the author’s part, just that we should be careful with unexplained binary content. I’m also not a svg format expert, but I’ll take a closer look when I get off work. |
|
It's not unexplained binary content, it's a PNG image blob, which can't contain malicious data |
|
I haven’t been able to examine the file yet. I’ve been assuming the png blob is the 16x16 logo, which is only 485 bytes. Is that not the case? Also, pngs can contain malicious content, but I wasn’t really concerned about the png blob because I’ve been assuming it’s 485 bytes, which would leave most of the other data as unexplained. |
it seems that the all of the other stuff is metadata that inkscape will add on to any exported files, which can easily be removed with svgo. if I apply the following modifications:
and then run <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#38342a" d="M9 1h1v1h1v1h1v1h1v1h1v1h1v2h-1v1h-2v1h-1v1h-1v1H9v2H8v1H6v-1H5v-1H4v-1H3v-1H2V9h1V8h1V7h1V6h1V5h1V4h1V2h1z"/>
<path fill="#dbd0b4" d="M4 9V8h1V7h1V6h1l1-1V4h1l.515-.487L9 3V2h1v1h1v1h1v1h1v1l-1.36.637L10 10l-1.45.55L8 12l-1.625.704-2.832-3.053Z"/>
<path fill="#bcb29c" d="M9 3h1v1h1v1h1v1h1v1h-1L9 4zM12 7l-.509-.44L11 7l-1 1v2h1V9h1zM10 10H9l-.443-.595L8 10v2h1v-1h1ZM8 12H7l-.477.546L7 13h1z"/>
<path fill="#c6bca5" d="M7 5h1v2h3v1H9V6H7ZM6 8h1v2h2V9H6z"/>
<path fill="#aea694" d="M3 9v1l3 3 .493.427L7 13v-1H6v-1H5v-1H4V9Z"/>
<path fill="#9a927e" d="M3 10v1h2v2h2v1H6v-2H4v-2z"/>
<path fill="#807a6d" d="M13 7h1v1h-1z"/>
<path fill="#aea694" d="M9 4v1h2v2h1V6h-2V4Z"/>
</svg>as for size:
|
|
FWIW, there is an option in inkscape to export as a plain SVG as opposed to an inkscape SVG |
Earthcomputer
left a comment
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.
This file should be made smaller as per previous comments
even if you export as a plain svg, it will still have the following things which running it through svgo would remove:
you can export as an "optimized svg" (file -> save as -> select "Optimized SVG" in the format dropdown. it can't be accessed through the normal export menu for some reason), which will fix some of these but will still leave some additional unnecessary stuff. after spending a bit of time doing the following:
here is a much smaller svg: <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#38342a" d="M9 1h1v1h1v1h1v1h1v1h1v1h1v2h-1v1h-2v1h-1v1h-1v1H9v2H8v1H6v-1H5v-1H4v-1H3v-1H2V9h1V8h1V7h1V6h1V5h1V4h1V2h1z"/>
<path fill="#dbd0b4" d="M4 9V8h1V7h1V6h1l1-1V4h1V2h1v1h1v1h1v1h1v1l-1 1-2 3-3 3-3-3z"/>
<path fill="#bcb29c" d="M9 3h1v1h1v1h1v1h1v1h-1L9 4zM10 10h1V9h1V7h-1v1h-1zH8v2h1v-1h1zM8 12H7v1h1z"/>
<path fill="#c6bca5" d="M7 5h1v2h3v1H9V6H7zM6 8h1v2h2V9H6z"/>
<path fill="#aea694" d="M3 9v1l3 3h1v-1H6v-1H5v-1H4V9z"/>
<path fill="#9a927e" d="M3 10v1h2v2h2v1H6v-2H4v-2z"/>
<path fill="#807a6d" d="M13 7h1v1h-1z"/>
<path fill="#aea694" d="M9 4v1h2v2h1V6h-2V4z"/>
</svg>Without whitespace<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="#38342a" d="M9 1h1v1h1v1h1v1h1v1h1v1h1v2h-1v1h-2v1h-1v1h-1v1H9v2H8v1H6v-1H5v-1H4v-1H3v-1H2V9h1V8h1V7h1V6h1V5h1V4h1V2h1z"/><path fill="#dbd0b4" d="M4 9V8h1V7h1V6h1l1-1V4h1V2h1v1h1v1h1v1h1v1l-1 1-2 3-3 3-3-3z"/><path fill="#bcb29c" d="M9 3h1v1h1v1h1v1h1v1h-1L9 4zM10 10h1V9h1V7h-1v1h-1zH8v2h1v-1h1zM8 12H7v1h1z"/><path fill="#c6bca5" d="M7 5h1v2h3v1H9V6H7zM6 8h1v2h2V9H6z"/><path fill="#aea694" d="M3 9v1l3 3h1v-1H6v-1H5v-1H4V9z"/><path fill="#9a927e" d="M3 10v1h2v2h2v1H6v-2H4v-2z"/><path fill="#807a6d" d="M13 7h1v1h-1z"/><path fill="#aea694" d="M9 4v1h2v2h1V6h-2V4z"/></svg>ofc, newlines & spaces are just for viewing & can be completely removed. sizes:
now, once compressed, it's 130-170 bytes smaller than the png image. |
Copied from comment on pull request FabricMC#101 because original author is not responding. FabricMC#101 (comment) Co-authored-by: solonovamax <solonovamax@12oclockpoint.com>
|
I expect random people coming in here looking around for this issue so they can implement the fabric icon into their readme file. Made with fabric API Fabric API+version |
No description provided.