Hacker News new | ask | show | jobs
by fwoty 1586 days ago
I don't think that's possible? Say if you had a perfect 1px wide black line @1x and then you change UI scaling set to 1.5, you now have a 1.5px (physical) wide line. Which means you'll get blurring.
1 comments

If you are displaying images with one pixel lines, yes. Buy how often do you view an image scaled to exactly one image pixel per screen pixel. And when it comes to UI and font toolkits, they account for variable scaling aren't usually drawing single pixel features. Anyway I haven't noticed any blurring. You'll only really get noticable blurring if you render at say 1x and display at more than 1x because the detail just isn't there.
I think this always applies. For instance the border on this textarea is 1px. There's nothing the OS can do, it's a physical issue. If UI scaling is 1.5, the correct answer for the size of the border is now 1.5 physical pixels. The best you can do is color the first pixel black and the second pixel the average of the first and third pixels. I might be wrong on this but I can't imagine what else it could do (other than mis-sizing the element).

I do agree that it probably looks fine and you wouldn't actually notice, unless you had an @2x monitor right next to it (of which there are sadly very few options)

If I'm not mistaken, you are talking about aliasing, and you are going to see that no matter what. There are always going to be assets made at a certain size and scaled to fit the particular element on the screen regardless of DPI. You'll perhaps see aliasing less with a 1080p screen since older UIs are built with them in mind, but these issues will be there regardless. Web pages will be this way on any monitor since they are always scaled.