RazrFalcon / svgcleaner

svgcleaner could help you to clean up your SVG files from the unnecessary data.
GNU General Public License v2.0
1.62k stars 93 forks source link

Wikimedia Compatibility Settings #223

Closed TPS closed 3 years ago

TPS commented 3 years ago

@RazrFalcon It'd be amazing to have a toggle to allow only optimizations that are compatible with Wikimedia's very old SVG rasterizer. (The Commons SVG Checker should be specifically helpful.)

N.B.: This replicates my request @ https://github.com/jakearchibald/svgomg/issues/195

RazrFalcon commented 3 years ago

This is out of scope and already possible anyway.

TPS commented 3 years ago

How's it possible? I didn't see an option for this.

I agree it might be out-of-scope, but it would be an amazing feature.

JoKalliauer commented 3 years ago

@TPS: Some features are implemented such as --join-arcto-flags no for https://phabricator.wikimedia.org/T217990 , or --list-separator comma for https://phabricator.wikimedia.org/T32033

More recommended svgcleaner-options for commons.wikimedia can be found at https://commons.wikimedia.org/wiki/User:JoKalliauer/Optimization#svgcleaner

If you want to bugfix for wikimedia-files you can use https://svgworkaroundbot.toolforge.org/ (using https://github.com/JoKalliauer/cleanupSVG )

However the bugs of librsvg are "endless", it is imho even implossible to render all svg's correctly. Wikimedia uses an outdated version of librsvg, many problems are already fixed, see https://phabricator.wikimedia.org/T193352 for Details.

PS On Wikimedia there is a very slow discussion if the renderer should be changed https://phabricator.wikimedia.org/T40010, the most promising results are by https://github.com/RazrFalcon/resvg by @RazrFalcon , see https://phabricator.wikimedia.org/T243893 for Details.

RazrFalcon commented 3 years ago

@TPS You have to simply know librsvg bugs. And I don't plan adding any library-specific presets or something.