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
Note that this can be reproduced in slintpad, but not on the rust-compiled demo.
I believe the difference is that the rust demo uses resvg to render the SVG, while the interpreter uses a <img> tag with a source being the URL of the .svg
ogoffart
changed the title
Printerdemo: "Latch" on the left side behind the sidebar icons looks wrong
wasm: Wrong SVG size if the svg don't have explicit with/height
Nov 8, 2024
The home-automation's padlock icon has the same issue.
The problem appear in the printer demo since commit 0fd9bf4 changed the svg so that it doesn't have a width and height hardcoded in the svg element.
resvg which is what we use to render svg in non-web, uses the size of the viewBox when width and height are not specified.
On the wasm interpreter, we do use an <img> element's naturalWidth / naturalHeight.
That returns 0 on firefox, and some wrong value with chromium.
I wonder if there is a better way to get the size that uses the viewbox of the svg if width and height are not specified.
The latch on the printerdemo looks wrong in Slintpad (1.8.0 version):
On chrome:
In Firefox:
Looks to me like the rendering of the SVG is missing/has the wrong size.
The text was updated successfully, but these errors were encountered: