| Summary: | Provide higher visual quality zoom for better accessibility | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Jérôme Brenier <j.brenier> |
| Component: | effects-various | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | wishlist | CC: | kde, kdedev, nate, ritchie |
| Priority: | NOR | Keywords: | accessibility |
| Version First Reported In: | 6.4.5 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Other | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Jérôme Brenier
2025-09-22 06:37:00 UTC
This seems worth considering. This is a cool idea, but it's a bit like asking for a car that can go 500 kph. Sure, it possible in theory, but the engineering effort required to get there will likely be vast. If there's a clever way to do this without rewriting the entire world, we should consider it. If not, it might not be worth the effort required. TL;DR: As Nate said, this is quite possible but quite complicated. Several weeks ago I was experimenting with a shape-preserving upscaler for the zoom effect. It would not have been *lossless* zoom, but it would have helped with text clarity at the extreme zoom levels I need. Trust me, we know it gets pretty bad. :) I couldn't get it to a good enough state to submit to Plasma, unfortunately. Diagonals and curves looked very funky, with an obvious alternating pixel pattern. I'd like to revisit it, but it would be a considerable use of my time given my own vision impairment. The main issue I'd see with genuine lossless zoom is - yes, we can tell an app to scale its UI by 100x, but some of them either won't listen - and would still be blurry. Otherwise, they might *try* to listen, and eat your hardware. If I zoom into a game running at 4K, for example, and zoom in by a factor of 80x, the game engine could misbehave and render the game world at 80x 4K resolution. I have a nice GPU, but it's not *that* powerful! My advice for getting the best out of zoom is to increase your resolution, increase your display scale, turn off subpixel font rendering if you have it on, and zoom in on that scaled desktop. If you use subpixel rendering when using zoom, you'll end up with rainbow artifacting on top of the blur. Even if I manage to get an upscaling shader to work well, it could still introduce problems of its own. (In reply to Ritchie Frodomar from comment #3) > TL;DR: As Nate said, this is quite possible but quite complicated. > > ... > My advice for getting the best out of zoom is to increase your resolution, > increase your display scale, turn off subpixel font rendering if you have it > on, and zoom in on that scaled desktop. If you use subpixel rendering when > using zoom, you'll end up with rainbow artifacting on top of the blur. Even > if I manage to get an upscaling shader to work well, it could still > introduce problems of its own. My idea would have been to be able to rely on this type of configuration to provide a zoomed image of perfect quality. If we take a factor of 2, the image displayed could be the "cutting" of an image rendered at 2 times the resolution with a desktop scaling of 2. This sort of perfect zoom could be limited to stay within the GPU's capabilities, or perhaps based on partial renderings of the image at increased resolution to limit CPU impact (but I don't know if that would be possible). > This sort of perfect zoom could be limited to stay within the GPU's capabilities
A major challenge is that they may be so limited that you wouldn't be able to zoom in very much at all.
I don't believe it would improve accessibility, if you have impaired vision this becomes moot.
>The use of wayland and the advances in fractional scaling seem to open up possibilities for obtaining a lossless zoom, so it would be very important to have it.
In theory, yes. In practice some apps like Telegram that do incorrect things with the scaling.
There's no requirement at a spec level for apps to draw the same contents at the newer scale so doing this would just break.
(In reply to David Edmundson from comment #6) > I don't believe it would improve accessibility, if you have impaired vision > this becomes moot. > > >The use of wayland and the advances in fractional scaling seem to open up possibilities for obtaining a lossless zoom, so it would be very important to have it. > > In theory, yes. In practice some apps like Telegram that do incorrect things > with the scaling. > There's no requirement at a spec level for apps to draw the same contents at > the newer scale so doing this would just break. I HAVE impaired vision and need to zoom in to use my computer, so my request to improve zoom focus is not an abstract or theoretical request. Windows or MacOS offer zooms with much higher quality, which allows me to have less visual fatigue and more pleasant use. I would like to have the same thing with Linux and Plasma desktops in particular. (In reply to Jérôme Brenier from comment #7) > (In reply to David Edmundson from comment #6) > > I don't believe it would improve accessibility, if you have impaired vision > > this becomes moot. > > > > >The use of wayland and the advances in fractional scaling seem to open up possibilities for obtaining a lossless zoom, so it would be very important to have it. > > > > In theory, yes. In practice some apps like Telegram that do incorrect things > > with the scaling. > > There's no requirement at a spec level for apps to draw the same contents at > > the newer scale so doing this would just break. > > I HAVE impaired vision and need to zoom in to use my computer, so my request > to improve zoom focus is not an abstract or theoretical request. > Windows or MacOS offer zooms with much higher quality, which allows me to > have less visual fatigue and more pleasant use. I would like to have the > same thing with Linux and Plasma desktops in particular. I also respectfully but wholeheartedly disagree with the "it's all moot if you're impaired enough to need that much zoom" take. The point of desktop zoom is to be able to increase the size of things on-screen until *they are* clear through your vision, that's why I use it over a screen reader. The reason macOS and Windows are able to do it with much higher quality than we are currently, is that they literally do (or, once did) use a shape-aware upscaling filter. They trade off on potential artifacting and blotchiness in images for better text clarity, since text is generally more important for us than realistic-looking photos. It's a viable solution. The problem I've been having in trying to implement it is, ironically, finding blind-accessible documentation on *what the algorithms these magnifiers use* are, and how to implement them. The closest I've found are upscaling filters geared toward pixel art that people use in the emulator scene for retro games. Things like hq4x. I just don't have the math skills to generalize them for a screen magnifier that lets you upscale by a factor of anywhere from _nothing_ to 100x. I have doubts that applying hq4x to a desktop rendered at 100x zoom is going to get us close to what the proprietary screen magnifiers are doing. I got fairly close experimenting with Sobel edge detection with the WCAG contrast measurement formula. This helped me mask out text and icons from the rest of Plasma, but that's as far as I could get. Actually identifying the shapes inside the detected edges, and filling them in with the correct colors, is a different story. The challenging part is anti-aliased text, and diagonal lines, and avoiding introducing halos and checkerboard patterns into the zoomed image. |