skiafy icon indicating copy to clipboard operation
skiafy copied to clipboard

Skiafy erroneous behaviour when filling shape

Open nsatragno opened this issue 1 year ago • 1 comments

Given the following SVG:

<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.5 9.5C9.5 8.119 10.619 7 12 7C13.381 7 14.5 8.119 14.5 9.5C14.5 10.881 13.381 12 12 12C10.619 12 9.5 10.881 9.5 9.5ZM16 3L16 15.5L8 15.5L7.999 3L16 3ZM14 17.5L10 17.5L10 21L14 21L14 17.5ZM7.5 17.5L8 17.5L8 21.5C8 22.327 8.673 23 9.5 23L14.5 23C15.327 23 16 22.327 16 21.5L16 17.5L16.5 17.5C17.327 17.5 18 16.827 18 16L18 3C18 1.897 17.103 1 16 1L8 0.999999C6.897 0.999999 6 1.897 6 3L6 16C6 16.827 6.673 17.5 7.5 17.5Z" fill="#5F6368"/>
</svg>

Skiafy produces:

CANVAS_DIMENSIONS, 24,
MOVE_TO, 9.5f, 9.5f,
CUBIC_TO, 9.5f, 8.12f, 10.62f, 7, 12, 7,
CUBIC_TO, 13.38f, 7, 14.5f, 8.12f, 14.5f, 9.5f,
CUBIC_TO, 14.5f, 10.88f, 13.38f, 12, 12, 12,
CUBIC_TO, 10.62f, 12, 9.5f, 10.88f, 9.5f, 9.5f,
CLOSE,
MOVE_TO, 16, 3,
LINE_TO, 16, 15.5f,
LINE_TO, 8, 15.5f,
LINE_TO, 8, 3,
LINE_TO, 16, 3,
CLOSE,
MOVE_TO, 14, 17.5f,
LINE_TO, 10, 17.5f,
LINE_TO, 10, 21,
LINE_TO, 14, 21,
LINE_TO, 14, 17.5f,
CLOSE,
MOVE_TO, 7.5f, 17.5f,
LINE_TO, 8, 17.5f,
LINE_TO, 8, 21.5f,
CUBIC_TO, 8, 22.33f, 8.67f, 23, 9.5f, 23,
LINE_TO, 14.5f, 23,
CUBIC_TO, 15.33f, 23, 16, 22.33f, 16, 21.5f,
LINE_TO, 16, 17.5f,
LINE_TO, 16.5f, 17.5f,
CUBIC_TO, 17.33f, 17.5f, 18, 16.83f, 18, 16,
LINE_TO, 18, 3,
CUBIC_TO, 18, 1.9f, 17.1f, 1, 16, 1,
LINE_TO, 8, 1,
CUBIC_TO, 6.9f, 1, 6, 1.9f, 6, 3,
LINE_TO, 6, 16,
CUBIC_TO, 6, 16.83f, 6.67f, 17.5f, 7.5f, 17.5f,
CLOSE

Which renders as

skiafy render of icon.

Instead, it should fill the bottom part of the security key icon

svg render of icon

I am not sure what is going on here.

nsatragno avatar Nov 13 '23 16:11 nsatragno

Did you try running that input SVG through SVGOMG first?

evanstade avatar Nov 13 '23 20:11 evanstade