-
Notifications
You must be signed in to change notification settings - Fork 32
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
Fixes icons with render issues on old systems #34
Conversation
I use Gravit Designer for the most of icons, but I exported to SVG and I am not sure if the Inkscape SVGO CLI commands, as your Papirus ffsvg, are compatible with Gravit-based and SVG-exported files. I have to switch from Gravit to Inkscape, redesigning the icons to overwrite SVG codes and applying SVGO commands. |
@gusbemacbe I sure that the files are compatible with Gravit Designer because the SVG files do not use non-standard elements. |
I would like to use your Multiple files
Or With a folder
But I did not find the option of plaining. |
What option does this? I understand what "plain" means for Inkscape, but I can not understand what it means for svgo. Could you show an example?
ffsvg.sh is a wrapper for another 5 scripts (see README.md there). One of these scripts, |
I will invent the inexistant commands:
Or
Is the script |
@gusbemacbe I still don't get... The plain SVG for Inkscape is an SVG without inkscape: and sodipodi: namespaces. What is the plain SVG for sgvo?
The script replaces matched colors to |
It is why I did not find the option of plaining. I want to plain firstly and then to optimise. I do not now if plain and optimise are the same.
I got it. But what the incompatibilities of the icons with Do I change only colours? Or do I have to readjust the codes in SVG of monochromatic and colourised icons? |
Here is the CLI list: https://www.npmjs.com/package/svgo. There is not option of plaining. :-( |
Change colors in
I try to explain to you that is nonsense. |
Dark (actions, apps, categories, mimetypes) Light (status) But there are small problems: many icons still use Inkscape metadata and some use RGB. Therefore, we need to use SVGO to convert RGB to HEX and optimising. |
@gusbemacbe the ffsvg for Suru++ is here Clone it as git repo:
Usage: Be careful, the script broke some icons without full CSS stylesheets. |
Instead of |
@gusbemacbe of course, the wrapper finds |
Hi @SmartFinn, ffsvg optimised the colourful icons (apps/scalable) but did not remove Gravit metadata and base64.
The |
@gusbemacbe Hi. Unfortunately, that can't be made in a dumb way. Needs something that does parse XML files. SVGO can do it, but I don't find a plugin for deleting elements by name. |
SVGO did not remove either. Inkscape does not remove, where exporting as optimised file. I will ask to programming forums. |
Only one of elements' regex worked: http://refiddle.com/nz75 |
Another element with base64's regex also worked: http://refiddle.com/nz76 |
I have wonderful news, @SmartFinn ! Using ffsvg, svgo (for regex) and regex to remove these elements, I have tested, applying the icons theme, icons of Albert, Brave, Insync, Latte, Vivaldi, etc. return to the normal. No broken icons. The mysterious bug is Gravit Designer metadata with base64 which caused rendering bug. All bugs are gone. Thanks to ffsvg, svgo and regex, I have reduced icons theme size from 170MB to 150MB, but of course I will reduced a lot, because I have not finished yet. |
I used the following command to reformat the path elements in the SVG files:
Then I clean the modified SVG files with Papirus ffsvg.sh script. I don't know what do you using for clearing the SVG files, so I use svgo with our config for it.