Hacker News new | ask | show | jobs
by chrisseaton 1632 days ago
Again I don't really know what you think you mean by 'blurred'? How do you think this is working?

If I tried all the possible scalings for my external monitor, the grey line around each window, to give a specific example of, is always a crisp physical one-pixel wide.

macOS creates a buffer to render to that is the same size as the physical output you're choosing to use, and is able to render with pixel precision in that buffer.

1 comments

Would be easier if you said what scalings have you tried and what is your external monitor native resolution.
4k external monitor - here's HN at all the scalings https://imgur.com/a/QTrI6uJ. For example, look at the white box around the Y, that's always rendered precisely on hard physical pixel boundaries. It's one pixel for some scalings, then moves to two pixels for larger scalings. It's never a blur from a larger or smaller image that is then interpolated. It renders at the native resolution, knowing physical pixel boundaries, by the scaling of the render commands (the x and y to render at, before the render command runs) not an intermediate rendered image. (Remember to download the images so you aren't using browser interpolation to scale them.)
This looks pretty good. Though scaling in browsers has been mostly independent of corresponding OS features for quite a while. E.g. the issues mentioned above with Linux and fractional scaling do not affect browsers as much. The problem is usually with native UI elements, such as the settings app itself.

However, it is unclear to me what are the scaling ratios relative to the native resolution in your examples. In this article for Sierra you seem to be only able to pick integer factors: https://www.eizoglobal.com/support/compatibility/dpi_scaling...

> In this article for Sierra you seem to be only able to pick integer factors

Maybe? But that's ancient history.

I don't know what the ratios are - the UI doesn't expose them.

What does it expose? In Sierra as you can see from the screenshot it simply shows scaled resolutions. So you can just divide native resolution by the scaled to get the factor.
It looks like it treats them as 0.5 / 0.67 / 0.78 / 0.87 / 1.0 scaling (1080 / 1440 / 1692 / 1890 / 2160 for physical resolution of 2160).

But this is all a bit arbitrary - I think the macOS API deals with an abstract 'points' unit.