On Fri, 2016-10-21 at 13:55 -0600, Chris Murphy wrote: > On Fri, Oct 21, 2016 at 1:41 PM, Adam Williamson > <adamw...@fedoraproject.org> wrote: > > On Fri, 2016-10-21 at 12:44 -0600, Chris Murphy wrote: > > > HP Spectre 13" 1920x1080 and all text everywhere by default is just on > > > the cusp of too small. I don't think this is really a hidpi display, > > > so I'd expect this problem to be much worse if it were 3200x1800. > > > > Actually, no, it'd be better. hidpi support goes in integers. I don't > > think any display in the world actually triggers 3x hidpi yet, so > > practically speaking, it's either on or it's off. > > > > The cutoff for 2x hidpi is 192dpi: if your screen is above 192dpi > > you'll get 2x hidpi, if it isn't, you won't. Now to the math! > > > > 1920x1080 at 13" is 169.45dpi, so you don't get hidpi. > > 3200x1800 at 13" is 282.42dpi, so you *do* get hidpi. > > I see. So it's binary handling, with a cutoff, rather than as a continuum.
Well yes, because you can't do hidpi as a continuum, unless absolutely every bit of chrome you have is a scalable vector. GNOME does not attempt to do any kind of automatic text scaling based on DPI detection because it's just too finicky and easy to get wrong, for several reasons. Some displays just don't tell the truth about their size. Even if we have a correct physical DPI for the display, we don't know how close you (the user) are to the screen, which is important. We can algorithmically determine a 'technically correct' scaling factor, by which we mean the factor at which the physical measurement of a '12 point' (or whatever) character on your screen is exactly the official physical size of a '12 point character'. But this is not actually the scaling factor you want on a laptop, because you sit closer to a laptop than to a desktop; people are broadly used to *desktop* displays scaling things to more or less the 'correct' size in this sense, but they're used to *laptop* displays making everything a bit smaller than it "ought to be", because you sit closer to your laptop than to your desktop and so to your eyes, everything being 'smaller than it ought to be' looks right. If you find the actual DPI of your laptop display and set the GNOME scaling factor to (that number) / 96, it will display text at the 'theoretically correct' size, but you will think 'holy crap everything looks huge' - to confirm this, try setting the GNOME and Firefox scaling factors to 1.765. We also wouldn't want to get too finicky about it; if a desktop display's physical DPI is anywhere within, say, 10-15% of 96, we probably just want to leave the scaling factor at 1.0 rather than adjusting it to be strictly 'correct', because fonts tend to be tweaked such that they render best at exactly 96dpi, so applying a small scaling factor loses you more (in terms of fonts suddenly starting to look a bit weird, particularly at certain sizes) than it gains you in 'technical correctness'. GNOME used to try and detect the display's DPI and apply a 'correct' scaling factor a long time ago; due to the above reasons and several others it no longer does, it always uses a scaling factor of 1.0 (i.e. a logical DPI of 96). This is also what Windows does. KDE thinks it detects the display's DPI, but in fact it does not, because it asks X for the display size, and X is specially configured to lie to it and report whatever display size will result in KDE calculating a DPI of 96; this I find particularly hilarious and documented in more detail at https://www.happyassassin.net/2015/07/09/of-dpis-desktops-and-toolkits/ . In case you're wondering, X lies to it for the same reason as GNOME doesn't bother detecting the DPI in the first place: the X devs came to the conclusion that trying to get clever about this stuff just isn't the right thing to do. In practice, every major OS - if we ignore hidpi - just hard codes a logical DPI of 96, and hardware manufacturers are perfectly aware of this and usually design hardware around it. This is why almost all desktop monitors have a native DPI somewhere between 90 and 110, and almost all laptop displays have a native DPI somewhere between 110 and 130 - because the manufacturers know that's what will look 'right' given the behaviour of the OSes. Similarly, desktop monitors intended for hidpi use have a native DPI somewhere between 180 and 220, and laptop monitors intended for hidpi use have a native DPI somewhere between 220 and 280. 13" 1080p laptops are the biggest exception to this that I can think of. I dunno what you do with them on Windows; I think Windows has a slider somewhere which more or less works like the 'scaling factor' setting. -- Adam Williamson Fedora QA Community Monkey IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net http://www.happyassassin.net _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org