-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
SVG DPI scaling issue with tiny-skia #2825
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
Labels
bug
Something isn't working
Comments
It doesn't just affect SVG, but also other renderings that use transformations, even simple translations like this are ignored by tiny-skia: let bounds_translation = Vector::new(
(bounds.x + (viewport.width - width_float) * 0.5).max(bounds.x), // center horizontally
bounds.y + y_offset,
);
renderer.with_translation(bounds_translation, |renderer| {
// ...
}); |
I'm unsure but there is fix for shadow rendering issue at #2715, perhaps similar approach could be made to fix bounds rendering with tiny-skia. |
This was referenced May 21, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your issue REALLY a bug?
Is there an existing issue for this?
Is this issue related to iced?
What happened?
When using an SVG on macOS with tiny-skia the layout is not correct:
It works fine using wgpu. I created a minimal repro for the issue here:
https://github.com/njust/iced-svg-issue.git
The issue exists on iced 0.13.1 and the current master (beddf49).
What is the expected behavior?
No layout issues. On Linux and Windows it's rendered as expected:
Linux
Windows
Version
crates.io release
Operating System
macOS
Do you have any log output?
The text was updated successfully, but these errors were encountered: