Re: F25 workstation, and (almost) hidpi displays

2016-10-28 Thread Ahmad Samir
On 21 October 2016 at 21:41, Adam Williamson  wrote:
[..]
>
> Use the 'scaling factor' setting in gnome-tweak-tool. On my 1920x1080
> 13" laptop (yup, I have one too) I set it to 1.3; adjust for your
> taste. Firefox should respect that setting so long as you have
> layout.css.dpi set to -1 (which is the modern default), though I'm not
> actually sure if that works on Wayland. You can also set a 'minimum
> font size' in the Firefox advanced font settings, though even that
> isn't universally respected, I don't think (web font rendering
> is...complicated).
[..]

Setting a minimum font size in Firefox always works in my experience;
however there are multiple "minimum font size" prefs in Firefox
depending on the language a web page sets via the lang= attribute
(usually for the  element). To cut to the point you can set the
minimum font size for each language by changing the language in the
"Fonts for" drop-down list in the Firefox fonts settings dialogue
(Preferences -> Content -> Advanced).



-- 
Ahmad Samir
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-27 Thread David Airlie
> > 
> > DP-3-1 connected primary 1920x1200+0+0 (normal left inverted right x axis y
> > axis) 518mm x 324mm
> > 
> > Not sure what you think is hiding it, sounds like KDE is just broken.
> 
> Well, no, that's not fair - X allows you to query the display size, and
> it used to return whatever the display claimed was its physical size,
> then it changed to returning a lie explicitly intended to cause things
> that do a DPI calculation to calculate 96pdi. KDE uses that X
> interface, and so when X changed its behaviour, it resulted in KDE
> almost always rendering at 96dpi (which is basically the result the X
> change wanted, but wasn't necessarily what the KDE developers wanted).
> 
> It's true that they *can* still query the actual EDID-reported display
> size somehow, but it's not really fair to say that KDE is 'broken' when
> X explicitly went and changed the interface KDE was using with the
> intent of making KDE do something different to what it thought it was
> doing.

They can use xrandr to get the screen size connected to the output, I'm
not sure what else they want.

The old DPI reporting was always broken for multimonitor, so was deprecated
in favour of reporting the sizes and letting the DE do whatever it wants,
the old API was also fixed in time as 96, you can override it on the X.org
command line if you want, but really to support multi-head properly, use
the new API.

Dave.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-27 Thread Adam Williamson
On Thu, 2016-10-27 at 20:29 -0400, David Airlie wrote:
> 
> - Original Message -
> > From: "Kevin Kofler" <kevin.kof...@chello.at>
> > To: devel@lists.fedoraproject.org
> > Sent: Friday, 28 October, 2016 7:50:48 AM
> > Subject: Re: F25 workstation, and (almost) hidpi displays
> > 
> > nicolas.mail...@laposte.net wrote:
> > > But, GTK core maintainers have always insisted those didn't exist (just
> > > like they insisted on hardcoding 96 dpi, on the eve of Apple showing the
> > > world it was arbitrary and obsolete).
> > 
> > The worst is that this mentality has infected the core X11 as well, also
> > breaking KDE's code that would carefully compute the correct DPI, if only
> > X11 would not go out of its way to lie to it about the physical screen size!
> 
> You could use the randr protocol to read the physical screen size,
> 
> DP-3-1 connected primary 1920x1200+0+0 (normal left inverted right x axis y 
> axis) 518mm x 324mm
> 
> Not sure what you think is hiding it, sounds like KDE is just broken.

Well, no, that's not fair - X allows you to query the display size, and
it used to return whatever the display claimed was its physical size,
then it changed to returning a lie explicitly intended to cause things
that do a DPI calculation to calculate 96pdi. KDE uses that X
interface, and so when X changed its behaviour, it resulted in KDE
almost always rendering at 96dpi (which is basically the result the X
change wanted, but wasn't necessarily what the KDE developers wanted).

It's true that they *can* still query the actual EDID-reported display
size somehow, but it's not really fair to say that KDE is 'broken' when
X explicitly went and changed the interface KDE was using with the
intent of making KDE do something different to what it thought it was
doing.
-- 
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


Re: F25 workstation, and (almost) hidpi displays

2016-10-27 Thread David Airlie


- Original Message -
> From: "Kevin Kofler" <kevin.kof...@chello.at>
> To: devel@lists.fedoraproject.org
> Sent: Friday, 28 October, 2016 7:50:48 AM
> Subject: Re: F25 workstation, and (almost) hidpi displays
> 
> nicolas.mail...@laposte.net wrote:
> > But, GTK core maintainers have always insisted those didn't exist (just
> > like they insisted on hardcoding 96 dpi, on the eve of Apple showing the
> > world it was arbitrary and obsolete).
> 
> The worst is that this mentality has infected the core X11 as well, also
> breaking KDE's code that would carefully compute the correct DPI, if only
> X11 would not go out of its way to lie to it about the physical screen size!

You could use the randr protocol to read the physical screen size,

DP-3-1 connected primary 1920x1200+0+0 (normal left inverted right x axis y 
axis) 518mm x 324mm

Not sure what you think is hiding it, sounds like KDE is just broken.

Dave.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-27 Thread Adam Williamson
On Thu, 2016-10-27 at 23:50 +0200, Kevin Kofler wrote:
> nicolas.mail...@laposte.net wrote:
> > But, GTK core maintainers have always insisted those didn't exist (just
> > like they insisted on hardcoding 96 dpi, on the eve of Apple showing the
> > world it was arbitrary and obsolete).
> 
> The worst is that this mentality has infected the core X11 as well, also 
> breaking KDE's code that would carefully compute the correct DPI,

Really? Does it compensate for laptop vs. desktop, or would it make
everything look huge on a laptop?
-- 
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


Re: F25 workstation, and (almost) hidpi displays

2016-10-27 Thread Stephen John Smoogen
On 27 October 2016 at 17:50, Kevin Kofler  wrote:
> nicolas.mail...@laposte.net wrote:
>> But, GTK core maintainers have always insisted those didn't exist (just
>> like they insisted on hardcoding 96 dpi, on the eve of Apple showing the
>> world it was arbitrary and obsolete).
>
> The worst is that this mentality has infected the core X11 as well, also
> breaking KDE's code that would carefully compute the correct DPI, if only
> X11 would not go out of its way to lie to it about the physical screen size!
>
> (I wonder how this works under Wayland. Does KDE finally get to see the real
> physical size again there, or is the kernel now a liar too?)

Everything is a liar.. starting from the monitor, to the video card to
the kernel to the display driver.


-- 
Stephen J Smoogen.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-27 Thread Kevin Kofler
nicolas.mail...@laposte.net wrote:
> But, GTK core maintainers have always insisted those didn't exist (just
> like they insisted on hardcoding 96 dpi, on the eve of Apple showing the
> world it was arbitrary and obsolete).

The worst is that this mentality has infected the core X11 as well, also 
breaking KDE's code that would carefully compute the correct DPI, if only 
X11 would not go out of its way to lie to it about the physical screen size!

(I wonder how this works under Wayland. Does KDE finally get to see the real 
physical size again there, or is the kernel now a liar too?)

Kevin Kofler
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-26 Thread nicolas . mailhot


- Mail original -
De: "Adam Williamson" 

> Sure, it's arbitrary. Arbitrary doesn't necessarily mean 'bad'. The
> 96dpi consensus worked perfectly well: hardware manufacturers knew what
> sizes and resolutions to make their monitors

That's pretty disingenious. Hardware manufacturers have not produced 96dpi 
laptops for years and the same people that worship the 96 dpi holy cow will 
tell you desktops are deads and laptops the only present or future.

96dpi is a convenient "consensus" to avoid fixing the stack. And then newer 
entrants like Apple or Google show up having fixed *their* stack with dips and 
hidpi, and the emperor is naked. 
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-26 Thread Martin Bříza
On Wed, 26 Oct 2016 09:20:30 +0200, Adam Williamson  
 wrote:



On Wed, 2016-10-26 at 08:30 +0200, nicolas.mail...@laposte.net wrote:

But, GTK core maintainers have always insisted those didn't exist
(just like they insisted on hardcoding 96 dpi, on the eve of Apple
showing the world it was arbitrary and obsolete).


...by releasing displays carefully tuned to look best at a precise
integer multiple of 96dpi? Not really great support for your theory.

Sure, it's arbitrary. Arbitrary doesn't necessarily mean 'bad'. The
96dpi consensus worked perfectly well: hardware manufacturers knew what
sizes and resolutions to make their monitors, and font designers (and
UI designers) knew that when they had to make a tricky decision about
how to tweak something, they should favour whatever choice makes it
look good at 96dpi. Which is really important when you're designing
something as finicky at a font, at a resolution as low as 96dpi; the
question of which point size you choose as the cutoff for rendering a
simple line as 1 pixel wide or 2 pixels wide is extremely important,
for e.g.

I used to go for the the 'everything should be perfectly resolution
independent!' argument, because it seems intellectually satisfying from
some sort of theoretical engineering point of view, but I find the
argument that it's not really the most *practical* way to do things
pretty convincing.

Even now, the consensus mostly survives; most hardware is designed to
work best at 96dpi or an integer multiple thereof. Awkward things like
13" 1080p displays are still in a distinct minority.


As a guy with a few screens that can be considered hidpi (3k on 13" and 4k  
on 23"), I have to say just integer scaling is just not enough, especially  
if you can't setup the scaling factor.


For example the 23" 4k display is NOT scaled, despite the fact I've got a  
fullHD display of the same size, that results in having windows on the 4k  
screen that are half as small as the ones on the fullHD display. Meanwhile  
the 3k 13" display actually is scaled (don't know the factor but I guess  
2x) and everything is way too large to my taste.


Scaling by an arbitrary float number may be too much but I think trying to  
mimic Windows in this wouldn't be a bad idea. There you can set (manually,  
despite there's an initial estimation of what you'd probably want) scaling  
to be 1x, 1.25x, 1.5x, 1.75x, etc. This still leaves room for glitches but  
I think on toolkit level, it's possible to tweak the layouts, font  
rendering,... just for those values.

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-26 Thread Adam Williamson
On Wed, 2016-10-26 at 08:30 +0200, nicolas.mail...@laposte.net wrote:
> But, GTK core maintainers have always insisted those didn't exist
> (just like they insisted on hardcoding 96 dpi, on the eve of Apple
> showing the world it was arbitrary and obsolete).

...by releasing displays carefully tuned to look best at a precise
integer multiple of 96dpi? Not really great support for your theory.

Sure, it's arbitrary. Arbitrary doesn't necessarily mean 'bad'. The
96dpi consensus worked perfectly well: hardware manufacturers knew what
sizes and resolutions to make their monitors, and font designers (and
UI designers) knew that when they had to make a tricky decision about
how to tweak something, they should favour whatever choice makes it
look good at 96dpi. Which is really important when you're designing
something as finicky at a font, at a resolution as low as 96dpi; the
question of which point size you choose as the cutoff for rendering a
simple line as 1 pixel wide or 2 pixels wide is extremely important,
for e.g.

I used to go for the the 'everything should be perfectly resolution
independent!' argument, because it seems intellectually satisfying from
some sort of theoretical engineering point of view, but I find the
argument that it's not really the most *practical* way to do things
pretty convincing.

Even now, the consensus mostly survives; most hardware is designed to
work best at 96dpi or an integer multiple thereof. Awkward things like
13" 1080p displays are still in a distinct minority.
-- 
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


Re: F25 workstation, and (almost) hidpi displays

2016-10-26 Thread nicolas . mailhot


- Mail original -
De: "Andrew Lutomirski" 

> (Projectors are probably a lost cause and perhaps it should be purely
> a function of resolution.)

Even for projectors it would be rather easy since video organisations (SMPTE, 
THX, ISF, etc) publish strict guidelines on the optimal viewing distance to use 
in common video modes, and any pro or semi-pro setup will honor them. Just 
Google "smpte projector distance" they're hardy top secret.

But, GTK core maintainers have always insisted those didn't exist (just like 
they insisted on hardcoding 96 dpi, on the eve of Apple showing the world it 
was arbitrary and obsolete).
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-25 Thread Andrew Lutomirski
On Tue, Oct 25, 2016 at 9:33 AM, Adam Williamson
 wrote:
> On Tue, 2016-10-25 at 09:30 -0700, Adam Williamson wrote:
>> On Tue, 2016-10-25 at 05:16 -0400, Bastien Nocera wrote:
>> >
>> > - Original Message -
>> > > Adam Williamson wrote:
>> > > > If you use Fedora (Workstation, at least, and I think maybe KDE too) on
>> > > > a 3200x1800 13" screen then hidpi mode will kick in, and everything
>> > > > will be sized as if you were using a 1600x900 13" screen, which is a
>> > > > pretty common setup.
>> > >
>> > > Yes, Plasma 5 definitely handles that as a hidpi display.
>> > >
>> > > But KDE is actually much smarter and can handle any DPI, though you will
>> > > likely have to configure it manually, because as you explained, the
>> > > developers of the commonly used X drivers decided to be jerks and
>> > > deliberately report a bogus geometry.
>> >
>> > [Citation really needed]
>>
>> Well, Kevin's framing of this is clearly...opionated...:) but my blog
>> post gave the citation.
>>
>> https://www.happyassassin.net/2015/07/09/of-dpis-desktops-and-toolkits/
>> https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/modes/xf86RandR12.c#n787
>>
>> as my post explained:
>
> Oh, since I'm referring to an old post I should note one thing: after I
> wrote that post (and partly because of it), GTK+'s behaviour was
> changed to just use a hardcoded default of 96dpi, like GNOME.
> Everywhere the post refers to GTK+ doing the same DPI calculation as
> KDE/Qt, that's no longer true. It doesn't do that any more.

All of this makes me wonder: should the system perhaps attempt to
estimate the number of pixels per visual inch or perhaps per degree at
expected viewing position?  This shouldn't be *that* hard -- there
would be a little table of estimated viewing distances for laptops,
desktops, and tablets, and the system could extrapolate from there.
(Projectors are probably a lost cause and perhaps it should be purely
a function of resolution.)

At the very least, it would be rather nice to have a real (not
gnome-tweak-tool or dconf) interface for scaling the UI.

--Andy
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-25 Thread Adam Williamson
On Tue, 2016-10-25 at 09:30 -0700, Adam Williamson wrote:
> On Tue, 2016-10-25 at 05:16 -0400, Bastien Nocera wrote:
> > 
> > - Original Message -
> > > Adam Williamson wrote:
> > > > If you use Fedora (Workstation, at least, and I think maybe KDE too) on
> > > > a 3200x1800 13" screen then hidpi mode will kick in, and everything
> > > > will be sized as if you were using a 1600x900 13" screen, which is a
> > > > pretty common setup.
> > > 
> > > Yes, Plasma 5 definitely handles that as a hidpi display.
> > > 
> > > But KDE is actually much smarter and can handle any DPI, though you will
> > > likely have to configure it manually, because as you explained, the
> > > developers of the commonly used X drivers decided to be jerks and
> > > deliberately report a bogus geometry.
> > 
> > [Citation really needed]
> 
> Well, Kevin's framing of this is clearly...opionated...:) but my blog
> post gave the citation.
> 
> https://www.happyassassin.net/2015/07/09/of-dpis-desktops-and-toolkits/
> https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/modes/xf86RandR12.c#n787
> 
> as my post explained:

Oh, since I'm referring to an old post I should note one thing: after I
wrote that post (and partly because of it), GTK+'s behaviour was
changed to just use a hardcoded default of 96dpi, like GNOME.
Everywhere the post refers to GTK+ doing the same DPI calculation as
KDE/Qt, that's no longer true. It doesn't do that any more.
-- 
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


Re: F25 workstation, and (almost) hidpi displays

2016-10-25 Thread Adam Williamson
On Tue, 2016-10-25 at 05:16 -0400, Bastien Nocera wrote:
> 
> - Original Message -
> > Adam Williamson wrote:
> > > If you use Fedora (Workstation, at least, and I think maybe KDE too) on
> > > a 3200x1800 13" screen then hidpi mode will kick in, and everything
> > > will be sized as if you were using a 1600x900 13" screen, which is a
> > > pretty common setup.
> > 
> > Yes, Plasma 5 definitely handles that as a hidpi display.
> > 
> > But KDE is actually much smarter and can handle any DPI, though you will
> > likely have to configure it manually, because as you explained, the
> > developers of the commonly used X drivers decided to be jerks and
> > deliberately report a bogus geometry.
> 
> [Citation really needed]

Well, Kevin's framing of this is clearly...opionated...:) but my blog
post gave the citation.

https://www.happyassassin.net/2015/07/09/of-dpis-desktops-and-toolkits/
https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/modes/xf86RandR12.c#n787

as my post explained:

"As you can see there are basically three paths: one if
monitorResolution is set, one if output->conf_monitor->mon_width and
output->conf_monitor->mon_height are set, and a fallback if neither of
those are true. monitorResolution is set if the Xorg binary was called
with the -dpi parameter. mon_width and mon_height are set if some X
config file or another contains the DisplaySize parameter.

If you specified a dpi on the command line, X will figure out whatever
‘physical size’ would result in that DPI for the resolution that’s in
use, and claim that the screen is that size. If you specify a size with
the DisplaySize parameter, X just uses that. And if neither of those is
true, X will pick a physical size based on a built-in default DPI,
which is...96."
-- 
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


Re: F25 workstation, and (almost) hidpi displays

2016-10-25 Thread Kevin Kofler
Bastien Nocera wrote:
> - Original Message -
>> But KDE is actually much smarter and can handle any DPI, though you will
>> likely have to configure it manually, because as you explained, the
>> developers of the commonly used X drivers decided to be jerks and
>> deliberately report a bogus geometry.
> 
> [Citation really needed]

Sorry, this is actually done in the XRandR code in the X server (though some 
drivers may be doing their own thing in addition):
https://www.happyassassin.net/2015/07/09/of-dpis-desktops-and-toolkits/
https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/modes/xf86RandR12.c#n793
https://lists.x.org/archives/xorg-devel/2011-October/026227.html
https://cgit.freedesktop.org/xorg/xserver/commit/?id=fff00df94d7ebd18a8e24537ec96073717375a3f

> So Qt 5.6 supports non-integer scale factors with the exact same problems
> that made GTK+ developers not support it.

Trying to support it is the way to get it fixed. And users may prefer having 
the application using the correct sizes with some minor glitches to having 
huge or unreadably small fonts, icons, etc.

Kevin Kofler
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-25 Thread nicolas . mailhot

De: "Bastien Nocera" 
> So Qt 5.6 supports non-integer scale factors with the exact same problems
> that made GTK+ developers not support it.

So QT 5.6 handles configurations GTK+ developers refused to envision.

-- 
Nicolas Mailhot
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-25 Thread Bastien Nocera


- Original Message -
> Adam Williamson wrote:
> > If you use Fedora (Workstation, at least, and I think maybe KDE too) on
> > a 3200x1800 13" screen then hidpi mode will kick in, and everything
> > will be sized as if you were using a 1600x900 13" screen, which is a
> > pretty common setup.
> 
> Yes, Plasma 5 definitely handles that as a hidpi display.
> 
> But KDE is actually much smarter and can handle any DPI, though you will
> likely have to configure it manually, because as you explained, the
> developers of the commonly used X drivers decided to be jerks and
> deliberately report a bogus geometry.

[Citation really needed]

> (KDE would just work if the drivers
> wouldn't go out of their way to break it.)
> 
> Since Qt 5.6, non-integer scale factors are also supported in principle:
> http://blog.qt.io/blog/2016/01/26/high-dpi-support-in-qt-5-6/
> though there may be rendering glitches and other issues with them.

So Qt 5.6 supports non-integer scale factors with the exact same problems
that made GTK+ developers not support it.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-24 Thread Kevin Kofler
Adam Williamson wrote:
> If you use Fedora (Workstation, at least, and I think maybe KDE too) on
> a 3200x1800 13" screen then hidpi mode will kick in, and everything
> will be sized as if you were using a 1600x900 13" screen, which is a
> pretty common setup.

Yes, Plasma 5 definitely handles that as a hidpi display.

But KDE is actually much smarter and can handle any DPI, though you will 
likely have to configure it manually, because as you explained, the 
developers of the commonly used X drivers decided to be jerks and 
deliberately report a bogus geometry. (KDE would just work if the drivers 
wouldn't go out of their way to break it.)

Since Qt 5.6, non-integer scale factors are also supported in principle:
http://blog.qt.io/blog/2016/01/26/high-dpi-support-in-qt-5-6/
though there may be rendering glitches and other issues with them.

Kevin Kofler
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Adam Williamson
On Fri, 2016-10-21 at 16:23 -0700, Thomas Daede wrote:
> Even more so
> because until recently, Qt still used EDID DPI scaling (as of 5.6, it
> supports a mode like Windows where it assumes 96dpi and supports
> fractional scale factors)

As I mentioned in my long mail, according to my investigation at least
it actually doesn't, because Qt tries to implement this by asking X for
the display size, and X doesn't try and tell it the truth. It just
takes the display resolution, figures out what reported display size
will make Qt calculate 96dpi for that display resolution, and tells it
that display size. The only exception to this is if you explicitly
specify DisplaySize in an X config file.

Many years ago when you queried X for the display size it would tell
you what the monitor claimed, but it doesn't any more.
-- 
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


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Thomas Daede
On 10/21/2016 03:31 PM, Adam Williamson wrote:
>> There was a lot of kerfuffle around the GTK (and Wayland) decision to
>> only support integer scales, searching for it will give you some background.
> 
> I don't recall that...do you have any specific references? At the time
> hidpi was first added to GNOME, IIRC, only OS X was really doing it,
> and it only did it in integers (because, as you say, they just make
> sure that's all the hardware they ship needs).

I think this thread was the start of the discussion:
https://lists.freedesktop.org/archives/wayland-devel/2013-May/009073.html

There were several after that. Sometimes they are quite difficult to
follow, as the concepts of fractional scaling, and scaling based on EDID
DPI are often mixed up, although they are orthogonal. Even more so
because until recently, Qt still used EDID DPI scaling (as of 5.6, it
supports a mode like Windows where it assumes 96dpi and supports
fractional scale factors)

There are technical issues with drawing natively at fractional scales,
such as choosing sizes of Xembeds or Wayland subsurfaces, which are
always snapped to the nearest pixel. Qt and Firefox manage, but probably
because neither really uses Xembeds, and both have to work on Windows.
There are also personal preferences, as integer scales with legacy
applications can use nearest neighbor resampling leading to sharp but
pixelated images, and fractional scaling usually uses bicubic or lanczos
which leads to soft images.

I think it would be great to improve the out of box experience for these
displays that sit at awkward scaling steps, with the tools that we
currently have. I'm not exactly sure of the best approach, though. For
example, Firefox could be changed to pick up a fractional scaling from
the gnome-tweak-tool's font scaling, but that means its widget sizes
don't quite line up with other GTK3 apps. You can also achieve Mac-style
2x->1.5x or 3x->2x scaling via xrandr plane scaling - maybe a UI could
be created for that (but with the performance caveats).

> Still, now I got curious and looked it up, it's a bit difficult to
> interpret Windows' history here. I can at least tell that Windows 7 and
> 8 had 100%, 125% and 150% scaling settings, and 8.1 and 10 have up to
> 200% and per-display scaling, but I haven't found any references as to
> exactly how this is implemented for each release - whether it's really
> interface scaling, complete with high-resolution interface assets in
> the OS so the scaled display actually looks sharp, or if it's just text
> scaling like GNOME's 'text scaling factor'...

I have a Windows 10 machine right next to me (being used by a coworker).
It appears to have full interface scaling, with high resolution assets,
for apps that indicate support. It's currently set to 1.5x scaling with
a 4k monitor.

For multiple displays, the app can only have one scaling at a time, but
it does change per monitor. Moving an app across screens causes a sudden
"snap" in its scale factor once it's over halfway to the other screen.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Adam Williamson
On Fri, 2016-10-21 at 15:18 -0700, Thomas Daede wrote:
> On 10/21/2016 03:08 PM, Adam Williamson wrote:
> > 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.
> 
> Yes, Windows also has a scaling factor, but it behaves more like the
> Firefox one - it supports non-integer scales. Applications that don't
> signal support for it are scaled by the compositor.

Well, I went and looked it up a bit, and it may support non-integer
scaling, but it's still fairly coarse: it goes in 25% increments. Text
scaling can be done pretty much as fine as you like (the GNOME and
Firefox text scaling factors will accept pretty much any decimal you
put in).

It's only the hidpi-type scaling that is integer-only on GNOME. Simple
text scaling predates hidpi support by years.
> 
> Mac hardware seems to have settled into choosing display densities where
> integer scaling makes sense, though on PC there is more variety,
> probably due to Windows supporting it.
> 
> There was a lot of kerfuffle around the GTK (and Wayland) decision to
> only support integer scales, searching for it will give you some background.

I don't recall that...do you have any specific references? At the time
hidpi was first added to GNOME, IIRC, only OS X was really doing it,
and it only did it in integers (because, as you say, they just make
sure that's all the hardware they ship needs).

Still, now I got curious and looked it up, it's a bit difficult to
interpret Windows' history here. I can at least tell that Windows 7 and
8 had 100%, 125% and 150% scaling settings, and 8.1 and 10 have up to
200% and per-display scaling, but I haven't found any references as to
exactly how this is implemented for each release - whether it's really
interface scaling, complete with high-resolution interface assets in
the OS so the scaled display actually looks sharp, or if it's just text
scaling like GNOME's 'text scaling factor'...
-- 
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


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Thomas Daede
On 10/21/2016 03:20 PM, Adam Williamson wrote:
> Out of curiosity, do you know if that's hidpi-style 'scale everything'
> scaling, or is it just font size scaling?

It's hidpi-style 'scale everything'. Apps can either natively draw at
1.5x or 1.25x, or be scaled by the compositor (with what looks like a
bicubic approximation).

> I read somewhere that Apple came up with a trick for doing 1.5x hidpi
> scaling - they just scale everything 3x in software then tell the GPU
> to scale it back down by 2x on output. Which is a neat wheeze. Be
> trickier to do 1.25x that way, though.

Yup, in theory this should be implementable by a Wayland compositor,
too. The downside is that this approach is disastrous to memory
bandwidth - you're rendering over double the number of pixels that you
need to, and then you have to sample from all of those pixels in the
compositor, too. It's also not compatible with hinting (which Apple
doesn't do anyway).
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Dan Book
On Fri, Oct 21, 2016 at 6:20 PM, Adam Williamson  wrote:

> On Fri, 2016-10-21 at 18:16 -0400, Dan Book wrote:
> > On Fri, Oct 21, 2016 at 6:08 PM, Adam Williamson <
> adamw...@fedoraproject.org
> > > wrote:
> > >
> > >
> > > 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.
> >
> >
> > FWIW, here on windows 7, there are just options for 1.25 and 1.5 scaling.
>
> Out of curiosity, do you know if that's hidpi-style 'scale everything'
> scaling, or is it just font size scaling?
>
> I read somewhere that Apple came up with a trick for doing 1.5x hidpi
> scaling - they just scale everything 3x in software then tell the GPU
> to scale it back down by 2x on output. Which is a neat wheeze. Be
> trickier to do 1.25x that way, though.


 It seems to be hidpi style. Looking into the help topic there's also an
option to set a custom scale anywhere between 1-5x in 0.01 increments.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Adam Williamson
On Fri, 2016-10-21 at 18:16 -0400, Dan Book wrote:
> On Fri, Oct 21, 2016 at 6:08 PM, Adam Williamson  > wrote:
> > 
> > 
> > 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.
> 
> 
> FWIW, here on windows 7, there are just options for 1.25 and 1.5 scaling.

Out of curiosity, do you know if that's hidpi-style 'scale everything'
scaling, or is it just font size scaling?

I read somewhere that Apple came up with a trick for doing 1.5x hidpi
scaling - they just scale everything 3x in software then tell the GPU
to scale it back down by 2x on output. Which is a neat wheeze. Be
trickier to do 1.25x that way, though.
-- 
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


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Thomas Daede
On 10/21/2016 03:08 PM, Adam Williamson wrote:
> 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.

Yes, Windows also has a scaling factor, but it behaves more like the
Firefox one - it supports non-integer scales. Applications that don't
signal support for it are scaled by the compositor.

Mac hardware seems to have settled into choosing display densities where
integer scaling makes sense, though on PC there is more variety,
probably due to Windows supporting it.

There was a lot of kerfuffle around the GTK (and Wayland) decision to
only support integer scales, searching for it will give you some background.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Dan Book
On Fri, Oct 21, 2016 at 6:08 PM, Adam Williamson  wrote:
>
>
> 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.


FWIW, here on windows 7, there are just options for 1.25 and 1.5 scaling.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Adam Williamson
On Fri, 2016-10-21 at 13:55 -0600, Chris Murphy wrote:
> On Fri, Oct 21, 2016 at 1:41 PM, Adam Williamson
>  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 

Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Chris Murphy
On Fri, Oct 21, 2016 at 1:35 PM, Thomas Daede  wrote:
> In Firefox, the about:config setting:
>
> layout.css.devPixelsPerPx
>
> can be set to an arbitrary non-integer scalefactor, such as 1.25 or 1.5.

1.25 is looking sane at the moment. I didn't realize it'd take a
non-integer. 2 is huge and worse than the -1 default.

>
> Unfortunately, GTK applications are limited to scalefactors of 1 or 2 so
> you're stuck with Large Text, gnome-tweak-tool's font scaling factor, or
> setting font sizes directly in gnome-tweak-tool.

Large Text is working OK.

But the actual question here is, why isn't this better out of the box?
And is there some threshold at which a display is considered hidpi and
it *is* better out of the box for those, and I was just at the cutoff.



-- 
Chris Murphy
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Chris Murphy
On Fri, Oct 21, 2016 at 1:41 PM, Adam Williamson
 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.


-- 
Chris Murphy
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Adam Williamson
On Fri, 2016-10-21 at 12:41 -0700, Adam Williamson wrote:
> 
> Use the 'scaling factor' setting in gnome-tweak-tool. On my 1920x1080
> 13" laptop (yup, I have one too) I set it to 1.3; adjust for your
> taste. Firefox should respect that setting so long as you have
> layout.css.dpi set to -1 (which is the modern default), though I'm not
> actually sure if that works on Wayland.

Actually I think Thomas is right on this one - I forgot about
layout.css.devPixelsPerPx , which I have set to 1.3 (matching my tweak-
tool 'scaling factor' - it's the same calculation). So set that too.
-- 
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


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Adam Williamson
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.

If you use Fedora (Workstation, at least, and I think maybe KDE too) on
a 3200x1800 13" screen then hidpi mode will kick in, and everything
will be sized as if you were using a 1600x900 13" screen, which is a
pretty common setup.

1920x1080 13" displays are actually just really awkward, as they fall
right in between what's approximately a 'standard' DPI for a laptop
display (110-140) and a level at which simple 2x hidpi would give you a
decent experience (if you try enabling 2x hidpi on a 1920x1080 13"
display, you'll see everything becomes way too big, as your effective
DPI is now ~85, which is way too low on a laptop).

> To compensate, I'm using Large Text in Universal Access. But
> applications don't use that, such as Firefox.  Further,
> Preferences>Content >Fonts & Colors> Size is not used on many sites,
> so that produces mixed results. Yes I can control-+ to get bigger
> text, but that's a per page setting apparently - so I get even more
> mixed results.
> 
> So... what am I missing that'd make this a better out of the box experience?

Use the 'scaling factor' setting in gnome-tweak-tool. On my 1920x1080
13" laptop (yup, I have one too) I set it to 1.3; adjust for your
taste. Firefox should respect that setting so long as you have
layout.css.dpi set to -1 (which is the modern default), though I'm not
actually sure if that works on Wayland. You can also set a 'minimum
font size' in the Firefox advanced font settings, though even that
isn't universally respected, I don't think (web font rendering
is...complicated).
-- 
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


Re: F25 workstation, and (almost) hidpi displays

2016-10-21 Thread Thomas Daede
In Firefox, the about:config setting:

layout.css.devPixelsPerPx

can be set to an arbitrary non-integer scalefactor, such as 1.25 or 1.5.

Unfortunately, GTK applications are limited to scalefactors of 1 or 2 so
you're stuck with Large Text, gnome-tweak-tool's font scaling factor, or
setting font sizes directly in gnome-tweak-tool.

On 10/21/2016 11:44 AM, 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.
> 
> To compensate, I'm using Large Text in Universal Access. But
> applications don't use that, such as Firefox.  Further,
> Preferences>Content >Fonts & Colors> Size is not used on many sites,
> so that produces mixed results. Yes I can control-+ to get bigger
> text, but that's a per page setting apparently - so I get even more
> mixed results.
> 
> So... what am I missing that'd make this a better out of the box experience?
> 
> This is gnome 3.22.1 on wayland. Thanks.
> 
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org