Merge pull request #4 from waldyrious/re-optimize-flags

Update svgo.yml and disable problematic arcto optimization
This commit is contained in:
HatScripts 2020-06-13 08:38:48 +10:00 committed by GitHub
commit 55819c65be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 13 deletions

View file

@ -41,7 +41,7 @@ First, edit the relevant SVG files in the `flags/` directory.
Then run `svgo` to optimize the SVG files:
```sh
svgo ./flags --recursive
svgo ./flags --recursive --config=svgo.yml
```
Then commit the changes, and submit them as a pull request.

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="256" fill="#eee"/><path fill="#0052b4" d="M256 0A256.2 256.2 0 000 256.2c170.6-.1 341.7.3 512-.2A256.2 256.2 0 00256 0zM34.4 384.2A256.8 256.8 0 00260 512a257 257 0 00217.6-127.8H34.4z"/><path fill="#d80027" d="M3.6 298.9a256 256 0 0011.1 42.6h482.6a256 256 0 0011-42.6H3.7z"/><path fill="#ffda44" d="M182.8 190.4l5.2 16.4h17.1l-13.8 10 5.3 16.3-13.8-10-14 10 5.4-16.3-13.9-10h17.1zm0 213.3L188 420h17.1l-13.8 10 5.3 16.2-13.8-10-14 10L174 430l-14-10h17.2zm-99.2-72.1l5.2 16.2h17.1L92.1 358l5.2 16.2-13.7-10-14 10L75 358l-14-10.1h17.2zm37.9-119.8l5 16h17.2l-13.8 10.3 5.2 16.2-13.7-10-14 10 5.4-16.3-14-10.1H116zm-60.4 67h17l5.5-16.2 5.2 16.2h17.1L92.1 289l5.2 16.4L83.6 295l-14 10.3 5.4-16.4zm46.5 143l5.3-16.2L99 395.4h17.1l5.4-16.2 5.2 16.3h17.1L130 405.6l5.3 16.2-13.8-10zM282 331.6l-5.4 16.2h-17l13.8 10.2-5.3 16.2 13.9-10 13.8 10-5.2-16.3 13.7-10.1h-17zm-38-119.8l-5.3 16.2h-17.1l14 10.2-5.4 16.2 13.9-10 13.8 10-5.3-16.3 13.8-10.1h-17zm60.3 67h-17l-5.3-16.2-5.4 16.2h-17l13.8 10.1-5.3 16.4L282 295l13.8 10.3-5.2-16.4zm-46.4 143l-5.3-16.2 13.8-10.2h-17l-5.3-16.2-5.4 16.3h-17.1l14 10.1-5.4 16.2 13.9-10z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="256" fill="#eee"/><path fill="#0052b4" d="M256 0A256.2 256.2 0 0 0 0 256.2c170.6-.1 341.7.3 512-.2A256.2 256.2 0 0 0 256 0zM34.4 384.2A256.8 256.8 0 0 0 260 512a257 257 0 0 0 217.6-127.8H34.4z"/><path fill="#d80027" d="M3.6 298.9a256 256 0 0 0 11.1 42.6h482.6a256 256 0 0 0 11-42.6H3.7z"/><path fill="#ffda44" d="M182.8 190.4l5.2 16.4h17.1l-13.8 10 5.3 16.3-13.8-10-14 10 5.4-16.3-13.9-10h17.1zm0 213.3L188 420h17.1l-13.8 10 5.3 16.2-13.8-10-14 10L174 430l-14-10h17.2zm-99.2-72.1l5.2 16.2h17.1L92.1 358l5.2 16.2-13.7-10-14 10L75 358l-14-10.1h17.2zm37.9-119.8l5 16h17.2l-13.8 10.3 5.2 16.2-13.7-10-14 10 5.4-16.3-14-10.1H116zm-60.4 67h17l5.5-16.2 5.2 16.2h17.1L92.1 289l5.2 16.4L83.6 295l-14 10.3 5.4-16.4zm46.5 143l5.3-16.2L99 395.4h17.1l5.4-16.2 5.2 16.3h17.1L130 405.6l5.3 16.2-13.8-10zM282 331.6l-5.4 16.2h-17l13.8 10.2-5.3 16.2 13.9-10 13.8 10-5.2-16.3 13.7-10.1h-17zm-38-119.8l-5.3 16.2h-17.1l14 10.2-5.4 16.2 13.9-10 13.8 10-5.3-16.3 13.8-10.1h-17zm60.3 67h-17l-5.3-16.2-5.4 16.2h-17l13.8 10.1-5.3 16.4L282 295l13.8 10.3-5.2-16.4zm-46.4 143l-5.3-16.2 13.8-10.2h-17l-5.3-16.2-5.4 16.3h-17.1l14 10.1-5.4 16.2 13.9-10z"/></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -1,20 +1,12 @@
# Default options: https://github.com/svg/svgo#what-it-can-do
floatPrecision: 1
multipass: true
plugins:
- removeTitle: true
- removeDesc: true
- removeUselessDefs: true
- removeHiddenElems: true
- removeDimensions: true
- removeViewBox: false
- removeUnknownsAndDefaults: true
- removeUselessStrokeAndFill: true
- removeUnusedNS: true
- cleanupIDs: true
- cleanupNumericValues: true
- collapseGroups: true
- removeRasterImages: true
- sortAttrs: true
- removeDimensions: true
- removeAttrs:
attrs:
- 'font.*'
@ -24,3 +16,10 @@ plugins:
- 'text.*'
- removeStyleElement: true
- removeScriptElement: true
# Avoid optimization that breaks some editors/viewers.
# For context, see https://github.com/svg/svgo/issues/1137
# and https://github.com/HatScripts/circle-flags/pull/4.
- convertPathData:
noSpaceAfterFlags: false
- mergePaths:
noSpaceAfterFlags: false