[vector icons] Fill regions are sometimes inverted when generating vector icons |
||
Issue descriptionOccasionally, after an SVG is run through svgo and then through the Skiafy script, the generated .icon will contain an extra path similar to: MOVE_TO, 0, 0, R_H_LINE_TO, 20, R_V_LINE_TO, 20, H_LINE_TO, 0, CLOSE, This has the effect of inverting the fill regions, i.e., the icon's outer region is filled rather than its inner region. The workaround is to just delete the extra path from the .icon file, but ideally this step should be automated.
,
Sep 13 2016
My thinking is that either Skiafy could detect such paths and not output them, or Chrome could detect such paths and ignore them. Though in some cases perhaps they may be intentional.
,
Sep 13 2016
> Isn't it a path in the source SVG as well? I'd have to take a closer look at some specific examples.
,
Apr 27 2017
I encountered this today. The SVG was: <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"> <g fill="none" fill-rule="evenodd"> <path d="M0 0h48v48H0"/> <path fill="#5A5A5A" fill-rule="nonzero" d="M33 32.744c1.748-.618 3-2.285 3-4.244 0-2.485-2.015-4.5-4.5-4.5S27 26.015 27 28.5c0 1.96 1.252 3.626 3 4.244V36h3v-3.256zM38 6c2.21 0 4 1.79 4 4v28c0 2.21-1.79 4-4 4H10c-2.21 0-4-1.79-4-4V10c0-2.21 1.79-4 4-4h28zM12 30v3h3v-3h-3zm0-12v3h12v-3H12zm0 6v3h6v-3h-6zm0-12v3h24v-3H12z"/> </g> </svg> The Skiafied version had an extra block at the top that inverted the fill: MOVE_TO, 0, 0, R_H_LINE_TO, 48, R_V_LINE_TO, 48, H_LINE_TO, 0, CLOSE, MOVE_TO, 33, 32.74f, R_CUBIC_TO, 1.75f, -0.62f, 3, -2.28f, 3, -4.24f, R_CUBIC_TO, 0, -2.48f, -2.01f, -4.5f, -4.5f, -4.5f, CUBIC_TO, ???, ???, 27, 26.02f, 27, 28.5f, R_CUBIC_TO, 0, 1.96f, 1.25f, 3.63f, 3, 4.24f, V_LINE_TO, 36, R_H_LINE_TO, 3, R_V_LINE_TO, -3.26f, CLOSE, MOVE_TO, 38, 6, R_CUBIC_TO, 2.21f, 0, 4, 1.79f, 4, 4, R_V_LINE_TO, 28, R_CUBIC_TO, 0, 2.21f, -1.79f, 4, -4, 4, H_LINE_TO, 10, R_CUBIC_TO, -2.21f, 0, -4, -1.79f, -4, -4, V_LINE_TO, 10, R_CUBIC_TO, 0, -2.21f, 1.79f, -4, 4, -4, R_H_LINE_TO, 28, CLOSE, MOVE_TO, 12, 30, R_V_LINE_TO, 3, R_H_LINE_TO, 3, R_V_LINE_TO, -3, R_H_LINE_TO, -3, CLOSE, R_MOVE_TO, 0, -12, R_V_LINE_TO, 3, R_H_LINE_TO, 12, R_V_LINE_TO, -3, H_LINE_TO, 12, CLOSE, R_MOVE_TO, 0, 6, R_V_LINE_TO, 3, R_H_LINE_TO, 6, R_V_LINE_TO, -3, R_H_LINE_TO, -6, CLOSE, R_MOVE_TO, 0, -12, R_V_LINE_TO, 3, R_H_LINE_TO, 24, R_V_LINE_TO, -3, H_LINE_TO, 12, CLOSE, END
,
Apr 30 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||
►
Sign in to add a comment |
||
Comment 1 by est...@chromium.org
, Sep 13 2016