-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
After ‘arcto’ path command(a or A), spaces are no longer removed by default #1353
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@TrySound PTAL |
Thanks a lot @yisibl! |
Thanks @yisibl 👍 |
@TrySound Can you help me change the git email and username of the master branch commit? I used the wrong company email. Or I resubmit a PR. Thanks a lot. |
You are so fast! That's it for now. |
This was referenced Feb 22, 2021
4 tasks
It's a fame, that software doesn't support SVG well 😒 |
This was referenced May 21, 2021
chore(deps): update dependency svgo to v2 - autoclosed
fisker/serve-directory-theme-city-lights#1346
Closed
This was referenced Jun 6, 2021
This was referenced Jun 6, 2021
This was referenced Jun 30, 2021
This was referenced Jul 28, 2021
wmfgerrit
pushed a commit
to wikimedia/design-codex
that referenced
this pull request
Jan 25, 2022
Adding further options to general SVGO config including - new `eol: 'lf'` and - new `finalNewline: true` both additions of recent minor SVGO versions. With that deleting the command line `final-newline` flag. With comment https://gerrit.wikimedia.org/r/c/design/codex/+/755319/comment/35fbaf55_19418aac/ pointing to svg/svgo#1353 the few added bytes seem acceptable for better usage of the libraries raw icons. Also in a far-future we might include Codex icon package raw SVGs as the general WikimediaUI icon library instead of currently OOUI – exposing them to a much wider audience. With that people opening those icons in Inkscape or similar will only become more common. Therefore re-crushing SVGs with new SVGO config and adding 'minify:svg' script to 'build:svg'. Bug: T299738 Change-Id: Ib1b97c793a1c41cde26a83932dca9f64bf67a4a9
wmfgerrit
pushed a commit
to wikimedia/design-codex
that referenced
this pull request
Feb 2, 2022
Changing build step sequence to optimize SVG files according to main SVGO config before transforming them. Re-adding micro optimizations removed in latest versions of SVGO svg/svgo#1353 for the transformed CommonJS/ES module/JSON formats. Also - adding section about SVGO optimization in icons 'README.md'. - adding section about icons licenses and adding a few links and general clarification. - updating snapshots with differently optimized icons. Bug: T299738 Change-Id: I6aaec1ab6c3b53918d087a83446a2051135d5fe4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
In the svg elliptical arc curve commands, the white space after
large-arc-flag
andsweep-flag
can be removed. Svgo was implemented here(258fecf) before and enabled by default.The idea of the implementer @GreLI at the time was:
However, more and more people report that there will be problems. I think that as an svg compressor, security and compatibility are the most important. Although browsers all support omitting the white space after large-arc-flag and sweep-flag, mainstream vector software such as Sketch and Adobe Illustrator do not support it. Even if these software are supported, they are paid software, and the upgrade cost for users is huge. As a designer, I can't understand why the SVG file compressed by svgo will make an error when reopened. We can't think about the problem from the perspective of a developer who can write code. Even for a developer, the rules of path data are obscure.
So this PR disables the
noSpaceAfterFlags
option by default. Although the compressed file size increases slightly, I think it is worth it. If your SVG file is only used in the browser or pursues the ultimate file size, you can enable it through the following options:Fixed: #1317 #1138 #1164 #1183 #1189