You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inkscape, the foremost open source SVG editor, always inserts a viewBox attribute when it creates a new SVG. This library ignores viewBox, causing it to scale these images incorrectly.
To demonstrate, I made a new Inkscape file, resized the canvas to 128x128px, and filled it with a circle:
But that's taking viewBox into account, which openfl/svg doesn't. Here's what you get when you use this library:
Note that you get the exact same result if you delete the viewBox attribute in Inkscape:
I may look into this further at some other point, but I'm hoping someone who already knows this library already knows where to go to fix this. I think you should scale based on the minimum of width and height, but don't quote me on it.
The text was updated successfully, but these errors were encountered:
Inkscape, the foremost open source SVG editor, always inserts a
viewBox
attribute when it creates a new SVG. This library ignoresviewBox
, causing it to scale these images incorrectly.To demonstrate, I made a new Inkscape file, resized the canvas to 128x128px, and filled it with a circle:
Which looks like this in the XML:
And looks like this when rendered in a browser:
But that's taking
viewBox
into account, which openfl/svg doesn't. Here's what you get when you use this library:Note that you get the exact same result if you delete the
viewBox
attribute in Inkscape:I may look into this further at some other point, but I'm hoping someone who already knows this library already knows where to go to fix this. I think you should scale based on the minimum of width and height, but don't quote me on it.
The text was updated successfully, but these errors were encountered: