jakearchibald / svgomg

Web GUI for SVGO
https://jakearchibald.github.io/svgomg/
MIT License
5.8k stars 485 forks source link

Wikimedia Compatibility Settings #195

Open TPS opened 4 years ago

TPS commented 4 years ago

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

TPS commented 3 years ago

@dabutvin Maybe consider this for your SVGClean?

JoKalliauer commented 3 years ago

@everyone I already answered it partly on svgcleaner/issues/223

@TPS svgo does imho hardly introduce librsvg-bugs, but it mostly runs in svgo-bugs itself. I think svgo should focus on svgo-bugs and not on librsvg-bugs. svgo (differently to svgcleaner) generally keeps the input-format, therefore it neither introduces, nor removes librsvg-bugs, e.g. phab:T32033 is not changed by svgo, therfore you should use other tools such as svgcleaner --list-separator comma or cleanupSVG or for other bugs scour --renderer-workaround --error-on-flowtext

However there is a librsvg-bug :phab:T217990 that is mostly (~85%) introduced by svgo, the imho only way to avoid it is to --disable=convertPathData .

My personal svgo-settings for commons.wikimedia.org are documented at :Commons:User:JoKalliauer/Optimization#svgo .

It might be not directly out-of-scope, but there are imho much more urgent svgo-bugs to fix. My personal opinion on svgoptimizers: -svgo: Is imho a collection of many different tools, imho anyone can contribute. -svgcleaner: Has a well defined scope: performance (i.e. fast), only valid SVG 1.1-files (i.e. invalid files might break), Compatibility (i.e. minimal number of svgcleaner-bugs). -scour: cares about librsvg-bugs, related to Inkscape (leading to code-freeze-cycles) -cleanupSVG: string-replacements specialized for commons.wikimedia.org (i.e. repairs librsvg-bugs, with a minimal change of the file) -SvgClean: didn't know till now (rather new tool: Feb 2019)