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
As for now, when I use the image widget with an SVG and an integer scaling on Wayland of 2, they appear blurry. That's probably the case because the Scalable vector graphic is scaled up the same way as any other raster-based image (JPEG, PNG, etc.). The feature I had in mind is to implement a scaling method for any vector-based image without loosing on quality.
Proposed configuration syntax
It could automatically be detected or explicit stated.
(image :path "icon.svg" :vector true)
Additional context
I use Hyprland with Wayland and an integer scaling of 2 on a 2880×1440 monitor with HiDPI.
The text was updated successfully, but these errors were encountered:
I think I found the solution in these two posts, and it applies to raster images as well as SVGs: 1. 2.
When an SVG is read as an image, it's read into a GTK "pixbuf" which is always raster (it's basically just an array of pixels). In theory would be fine - just write more pixels into the pixbuf. However, a pixbuf is always rendered in logical pixels rather than display pixels, so this would scale it up too big (and still be blurry).
The solution is to fill the pixbuf at 2x scale (or whatever the scale should be), and then convert it to a cairo surface, which supports rendering at integer scales. Then the final image can be set from the cairo surface.
I'm going to play around with this soon, it should be relatively straightforward to implement.
I came across the librsvg library, which appears to serve a similar purpose to ours—rendering SVG icons on the desktop. Although I haven't used GNOME in a while, I don’t recall it having issues with blurry icons.
Description of the requested feature
As for now, when I use the image widget with an SVG and an integer scaling on Wayland of 2, they appear blurry. That's probably the case because the Scalable vector graphic is scaled up the same way as any other raster-based image (JPEG, PNG, etc.). The feature I had in mind is to implement a scaling method for any vector-based image without loosing on quality.
Proposed configuration syntax
It could automatically be detected or explicit stated.
(image :path "icon.svg" :vector true)
Additional context
I use Hyprland with Wayland and an integer scaling of 2 on a 2880×1440 monitor with HiDPI.
The text was updated successfully, but these errors were encountered: