Can't displays report their physical dimensions now? Couldn't this be used to restore using a physical dimension like mm for font sizes? (Please not inches of all things though!)
Can't displays report their physical dimensions now? Couldn't this be used to restore using a physical dimension like mm for font sizes? (Please not inches of all things though!)
The reason why the author is having issues with text sizes on different size monitors is that macOS does not support fractional scaling; and it's high-DPI detection is fairly limited. A non-high-DPI monitor has no scaling options whatsoever, it's locked to 1x. High-DPI monitors are locked to 2x; with the additional option to change the desktop's layout size and scale the resulting image to achieve the effect of fractional scaling. (Apple is really paranoid about introducing rounding errors in pixel-aligned layouts, which is why they handle non-integer displays this way.)
BTW, if anyone happens to know how to manually flag a monitor as HiDPI in macOS Mojave (or if I can do it in Catalina/Big Sur), please let me know. I have a 1080p NexDock Touch that I have to run at 720p because macOS won't give me the fractional scaling options on an external monitor.
It is worth noting that when Apple was initially developing this feature, around the time of Mac OS 10.5 (Leopard), they had fractional scaling. I thought it was awesome. I can only assume that some artists felt it was not awesome. (I'm going to stop googling for this now, but I think 'Resolution Independence" is a key phrase that will help in finding it if you are interested).
As for HiDPI mode, I know I've done it in the past for external displays, but I haven't been able to get it to work with my 1080p displays using Big Sur. I think this might've been the most useful link I've come across: https://www.reddit.com/r/hackintosh/comments/jh6pjd/hidpi_on... . If you do manage to get it to work, a toolbar app like ResolutionTab or EasyRes is then a big help for changing between modes.
This gets particularly bad on the web, where a number of different tricks have been employed by browser vendors over the years to avoid rounding errors (see https://www.palantir.net/blog/responsive-design-s-dirty-litt...). If you have, say, a float-column layout with percentage widths, then rounding errors can easily wind up making things either not line up or, worse, actually overflow their containers for no reason, breaking the layout. Throwing non-integer scaling into the mix makes this even worse.
Of course, this is a tractable problem, but it was much easier for Apple to just render-and-downscale from the nearest whole-number factor instead of making the lives of any developer with custom layout engines that much harder.
A related problem happens in word processors: if you just layout and render a document at 1x, but at print time, you layout and render at any higher resolution; you will get a different layout. Lines of text that are just over the width of the page when rounded to the 1x pixel grid will be just under the width of the page at the higher-density grid of a high-DPI printer. This happens even at integer scales because fonts are designed on abstract grids that have no relation to (and are far finer than) the pixel grid that the document will be displayed on printed on.
(Complicating things, Windows intentionally renders fonts using custom rounding logic to force them onto the pixel grid as much as possible, this is known as ClearType. macOS doesn't do this nearly as heavily, which is why fonts look less sharp but more faithful on non-Retina Macs.)
AFAIK word processors either have to always round metrics down (so that layout decisions are deterministic at all scales) or always work on a 1x layout and render at higher resolutions using the 1x layout metrics.
(For context: https://medium.com/we-are-appcepted/the-curious-case-of-ipho... )
(And that doesn't even begin to address the question of what part of the font you'd be measuring.)