Hacker News new | ask | show | jobs
by altcognito 1625 days ago
MacOS doesn't scale. You can change font sizes, you can change resolution, but scaling via DPI isn't present.

https://apple.stackexchange.com/questions/193723/scaling-all...

If somebody understands the situation better on MacOS I'd be interested, but based on my experience, Windows is the only OS that gets this as close as possible to right. It's a single setting that affects all applications and I can set monitors independently and it will scale on the fly (even if it does look a little weird as you drag an app across and it dynamically shifts)

Every now and then I'll come across a app that doesn't quite deal with high DPI scaling correctly, but it is the exception to the rule.

Linux also works pretty well, but as with everything Linux, it's almost always "it depends and well, not quite" (not usually multi-monitor aware, lots of per app settings)

3 comments

I'm not really sure what you think 'scaling' means or what you think this Stack Exchange answer means, but macOS (not 'MacOS') does allow scaling the UI of both integral and external monitors, and independently.

It renders a high-resolution image to a buffer, and then scales that when rendering to the actual screen buffer. The buffer image is at least as large as the actual screen buffer.

You can see for yourself that it isn't changing the hardware resolution of external monitors when scaling by taking a look at the actual resolution on your monitors OSD if it has done. It'll always be the native resolution.

It does not do 1.5 or 1.33 or 1.25 scaling, or does it blurred. Windows can handle any ratio.
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.

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...

> It does not do 1.5 or 1.33 or 1.25 scaling, or does it blurred. Windows can handle any ratio.

Non-integer scaling (of a pixel source, vectors are different but not relevant here) either requires blending or crisp unequal-sizing artifacts.

In Mac OS, because that's how its scaling is designed. Windows does not have this problem, because it tells programs to render themselves at 1.33 or whatever and provides facilities to do it without pain in the ass. As the result scaling in Windows is painless with any displays at any resolutions. In fact, my main setup has two 1.25x DPI displays and an old 1x DPI display with zero blending or sizing artifacts excluding brief moments when you move a window from 1.25x display to 1x one until it lands.
What? MacOS does scale. MacOS was doing this correctly years before Windows!

First of all, DPI is not the metric we're interested in. That is a unit for print quality, and it has no relevance for an OS, for Photoshop, or anything we do on a screen. The operating system does not know how big your screen is. Inches nor dots are relevant; only pixels are. It would be more accurate to talk about the ratio of monitor pixels to apparent pixels. I guess Microsoft finally got the memo in Windows 11 (or was it 10?) and changed to percentages.

In MacOS, a 4K monitor set to 1920x1080 will still be 3840x2160, but it displays 4 pixels for every 1 apparent pixel. Everything scales correctly, except for legacy applications. The UI elements, text, etc. appear to be a sharper version of 1080p. In Windows land, this is the same thing as "200%." As far as I can tell, Windows does the same thing but uses scaling percentages instead of apparent resolution.

Your only problem with Windows appears to be that it named the scaling setting "DPI" until Windows 7 or so to handle scaling. But as the parent mentioned, Windows is definitely superior to MacOS, as it provides arbitrary scaling ratios, and renders text perfectly at any ratio.

To go deeper into nitpicking, DPI is not even that misleading, if you take "inch" in DPI to be equal to 72 points as used in font sizes. Then a 72pt font on the screen with DPI X will be rendered with height of X pixels.

DPI is a valid metric for anything that the human eye sees. There's no difference in that regard between text printed on paper, and text displayed on the screen. The smaller the dots, the better it looks.

And yes, the OS does in fact know how big your screen is: https://en.wikipedia.org/wiki/Extended_Display_Identificatio...

Huh?

I'm not sure what you mean. My MacOS does the scaling and it looks good.

How is MacOS scaling different?