7 ms·
It's funny that it has been around 9 years now since Apple introduced retina macbooks and their implementation of HiDPI is good from the start but, while it's g
by mciancia 5y ago
It's funny that it has been around 9 years now since Apple introduced retina macbooks and their implementation of HiDPI is good from the start but, while it's getting better, windows and linux still need to catch up.
- pavlov 5y agoIt’s because Apple was very forward-looking in 1999 and decided to use floating point coordinates for the CoreGraphics API. Nothing on the Mac draws using exact integer pixels (since the death of the transitional Carbon API anyway). Scaling was built in from scratch.
- dTal 5y agoWhat exactly is wrong with "scaling" on Linux? I use Qt apps on Plasma and everything just works. Nearly all my displays are HiDPI now.
- vladvasiliu 5y ago> Nearly all my displays are HiDPI now. Well, that's the whole thing. HiDPI in and of itself works well. I use it with a 24" UHD monitor and I absolutely love the setup. But the main issue with Linux, at least with X11, is that it doesn't handle multiple displays with different DPI settings. As you noted, QT seems to work fine, as do some other toolkits that have dynamic scaling according to the monitor size. Alacritty does this too, for example (don't know what toolkit they use, though). But GTK in particular is terrible. Yes, you can configure it to use scaling, in which case it works well, IF you don't need fractional scaling (though recent versions of Gnome seem to support it somehow). But now, if you're going to use, say, a HiDPI laptop with a "regular", larger external monitor, you're gonna have a bad time. If you enable scaling, the widgets will be huge on the LoDPI display. If you disable it, widgets will be teeny tiny on the HiDPI one.
- badsectoracula 5y agoNote that the problem isn't really with X11 (or at least Xorg) since it does provide the necessary information via RandR to perform per-monitor scaling. The issue is really with window managers and toolkits. What needs to happen is that window managers ask the applications (the top level windows really) to scale themselves -this can be done not just for DPI purposes- and then the applications should apply that scaling. (applications should expose that they can support this - like they expose that they support handling a 'close window' event - so that compositing window managers can do it themselves for applications that do not support it, which is also why this needs to go through the window manager) Qt can do this but AFAIK window managers do not do this because there isn't any standard events for that - i remember an email about this exact topic when i took a look at the Xorg mailing list for WMs some time ago, but it didn't seem to be going anywhere (in that it barely had any replies). So it really is about standardizing how it is to be done. I think the main reason it isn't done is that such setups are comparably rare (i mean hidpi displays themselves are very rare - if you check any desktop resolution stats they often barely are a blip - and having both a hidpi display and a regular dpi one is even less common than that) so developers aren't that interested in implementing such a thing. One way it could be done however is also pushing the idea that this isn't just for multimonitor setups: as i wrote above, you can use that for generic scaling, which is useful even for single monitor regular dpi setups (if anything it can be very useful for low resolution setups - like 1366x768 and similar which are way more common than hidpi - when faced with applications with a lot of padding, etc).
- grishka 5y agoThe issue with Linux is that nothing is part of the system. There's no single standard GUI toolkit. There's no single standard windowing system. There's way too many variations of everything.
- herbst 5y agoSome of us don't call that an issue ;) it just makes discussions about what's possible more complicated
- danieldk 5y agoWhat exactly is wrong with "scaling" on Linux? I use Qt apps on Plasma and everything just works. Nearly all my displays are HiDPI now. If you use 2x scaling (or other integer scaling), everything is fine. If you need fractional scaling, things break down pretty quickly, at least on GNOME. Once you use fractional scaling (e.g. 1.5), GTK applications will scale correctly, but are slightly slower and consume more mattery. However, all XWayland applications are unusably blurry. Unfortunately, fractional scaling is really needed on 14" 1080p laptops or 4k e.g. 27" screens. With 1x scaling everything is tiny and with 2x scaling gigantic. The only workaround that worked ok for me was using 1x scaling and using font scaling in GNOME. Many controls and icons are tiny that way, but at least text is readable and not blurry. Of course, this only works up to some extend and when both screens need the same amount of scaling (since font scaling cannot be configured per screen). [1] https://gitlab.gnome.org/GNOME/mutter/-/issues/566 https://gitlab.gnome.org/GNOME/mutter/-/issues/566
- hollerith 5y agoOn a non-HiDPI display (I use one that is 1680 by 1050 and one that is 1280 by 1024) fractional scaling works fine on my machine running Gnome 34 with apps that bypass XWayland and talk directly with Wayland (which is true of all the apps I use). (Google Chrome needs to be started with a couple of command-line switches to bypass XWayland.) But your comment makes me hesitate to buy a HiDPI monitor!
- hollerith 5y agoEr, I mean Gnome 40 on Fedora 34.
- dTal 5y agoI guess this is the issue with saying "Linux" supports or doesn't support things. My software stack of Xorg/Qt/Plasma works fine. Your stack of Wayland/GTK/GNOME doesn't. Should we hold it against "Linux"? Is that a fair comparison to MacOS, where everything uses Cocoa? For that matter, how do GTK apps look on MacOS?
- deleted 5y ago[deleted]
- JKCalhoun 5y agoWhen your graphics model is Display PostScript (and then PDF)....
- Kwpolska 5y agoThe scaling was quite glitchy in 2009 [0], and in 2021, the only allowed scale factors are 100% and 200% — so you don’t need floating-point numbers for it. [0]: https://arstechnica.com/gadgets/2009/08/mac-os-x-10-6/21/#resolution-independence https://arstechnica.com/gadgets/2009/08/mac-os-x-10-6/21/#re...
- zacwest 5y agoIf you want to position an @2x view (1 pt = 2 px) you need to use fractional points. A view at (0, 0.5) in points is (0, 1) in pixels. Resolution Independence was a separate concept.
- tonyedgecombe 5y agoHiDPI has been a nightmare on Windows. I have wasted so much time making it work on a Windows Forms application.
- BeFlatXIII 5y agoThey’ve had wonderful trackpads for even longer and PC laptop OEMs still have yet to catch up. No, I’m entirely uninterested in the touchscreen gimmick of the week.
- FreakyT 5y agoI feel like Apple's approach to hardware made their job much easier -- they just ensured that every retina Mac had a display with exactly 2x the pixels as its pre-retina equivalent, so they never had to deal with fractional scaling like Windows often does.
- solarkraft 5y agoYet that too works very well.
- bombcar 5y agoThey deal with lots of fractional scaling - at first they may have done simple pixel doubling but now the screens are often at non integer ratios. In fact you can speed it up slightly by making sure the display resolution is exactly “half” the actual resolution so to prevent MacOS from scaling 8x internally first.
- Kwpolska 5y agoThe only scales supported by Apple software are integer scales (1x, 2x, 3x). The iPhone 6 Plus had a 2.6x screen — iOS would render at 3x and then scale the image down to fit. https://www.paintcodeapp.com/news/iphone-6-screens-demystified https://www.paintcodeapp.com/news/iphone-6-screens-demystifi...
- bombcar 5y agoSee https://9to5mac.com/2016/12/02/15-inch-macbook-pro-screen-resolution-blurry/ https://9to5mac.com/2016/12/02/15-inch-macbook-pro-screen-re... - it renders at 8x or something and scales down inexactly.
- Toutouxc 5y agoThe article clearly states that macOS always draws 2x and just displays the result, individual pixels be damned. Anyone can confirm this simply by taking a screenshot and looking at the resolution (screenshots are always the size of the underlying framebuffer)
- tootie 5y agoFunny enough I did a bunch of projects that required pushing like 16K output (video wall, not a personal setup) and at that point Windows becomes the only option because it requires high end GPU and an array of outputs.