GNU bug report logs -
#45596
12.2.4; Wrong DPI calculation for mixed-DPI multi-monitor setups
Previous Next
Reported by: Grzegorz Kowzan <grzegorz <at> kowzan.eu>
Date: Fri, 1 Jan 2021 14:59:02 UTC
Severity: normal
Found in version 12.2.4
Done: Tassilo Horn <tsdh <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Grzegorz Kowzan <grzegorz <at> kowzan.eu> writes:
Hi Grzegorz,
>> I guess the problem is that mm-size in the `frame-monitor-attributes'
>> return value differs from `display-mm-height' and `display-mm-width'.
>
> 1) Yes, `display-pixel/mm-width/height` functions are defined in terms
> of Xlib calls, whereas `frame-monitor-attributes` calls Gdk functions
> (if Emacs was compiled with Gtk support) and only as a fallback it
> calls Xlib. This is why we have this inconsistency. The standard DPI
> for Xorg server is 96 regardless of the actual value, so for a given
> resolution and assumed DPI Xorg gives fake mm width and
> height. Essentially, the current calculation of DPI in auctex looks
> pointless to me...
Ok, I see.
> With pure Gtk port we get actual physical pixel width/height and
> actual mm width/height, so I guess when auctex detects pgtk port, it
> can either ignore these values and hardcode DPI of 96 or make use of
> the actual DPI. I suppose there is something to be said for not
> changing auctex's behaviour and hardcoding the value, but I would
> prefer to use the actual DPI at least as an option (see below).
That's what I did. Essentially I've applied your patch with an
additional fboundp check for `frame-monitor-attributes'. If it's
available (24.4), then your variant is used, if not, the previous
variant basically always saying 96 DPI is used.
So let's see if we get any complaints with the next ELPA release.
I'll close this report now. Thanks again for the contribution!
Bye,
Tassilo
This bug report was last modified 4 years and 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.