all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: martin rudalics <rudalics@gmx.at>, Eli Zaretskii <eliz@gnu.org>
Cc: 60585@debbugs.gnu.org, rpluim@gmail.com
Subject: bug#60585: 30.0.50; global-text-scale-adjust shrinks window (was not before), was: Re: bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
Date: Sun, 29 Jan 2023 03:25:00 +0200	[thread overview]
Message-ID: <309dcf34-b553-58c2-34a5-270028b05347@yandex.ru> (raw)
In-Reply-To: <90b5e151-39d1-0248-7be5-8084d8883e5f@gmx.at>

On 28/01/2023 17:36, martin rudalics wrote:
>  >> This shows how scaling strongly affects whatever GNOME displays here 
> and
>  >> what Emacs uses internally.  It might be illustrative to put two 
> equally
>  >> sized frames above each other - one from a GTK and one from a Lucid
>  >> build - and look at what size hints GNOME displays for each of them.
>  >
>  > Let me know if you really need that -- I'd have to compile Emacs in 
> two separate directories.
> 
> One of these days please do.  Eventually we need someone to tell us how
> Lucid builds scale and whether the results look different from the GTK
> builds.  If nobody knows, we could try to guess from what Lucid and GTK
> frames look like on your display.

OK, I have done so now.

First of all, they start up with different dimensions: Lucid's is a bit 
shorter and narrower. GNOME says Lucid is 78x34 and GTK3 is 79x35.

Internally, both think they are 80x36.

The end of *foo* for GTK3 contains:

xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 
16 borders 0 text width 720 base width 33 width inc 9
     char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height 
648 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 
16 borders 0 text width 720 base width 33 width inc 9
     char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text 
height 648 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 
1488x1296 outer pixels 744x714 outer rest 0x0
     base_size 33x84 size increments 9x18 WM hint 79x35

And for Lucid, it contains:

EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
adjust_frame_size old native pixels 1474x1332 new native pixels 
1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text 
chars 80x36 new text chars 80x36

(I avoid inserting the full contents for brevity, they are several times 
longer in both cases.)

Lucid's menu bar and tool bar look shorter in height, with less padding. 
The font size seems to be equal, however. And the tool bar icons are 
scaled on Lucid too.

I tried to resize them, but (as long as pixelwise resizing is disabled), 
they don't match exactly. But if I line them up very close, GNOME says 
Lucid (which is slightly larger) is 81x37 and GTK3 is 80x36. Here are 
respective logs:

GTK3:

xg_frame_resized old native pixels 1506x1296 new native pixels 1488x1296
adjust_frame_size old native pixels 1506x1296 new native pixels 
1488x1296 old text pixels 1458x1296 new text pixels 1440x1296 old text 
chars 81x36 new text chars 80x36
     base_size 33x84 size increments 9x18 WM hint 79x35
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1332
adjust_frame_size old native pixels 1488x1296 new native pixels 
1488x1332 old text pixels 1440x1296 new text pixels 1440x1332 old text 
chars 80x36 new text chars 80x37
     base_size 33x84 size increments 9x18 WM hint 79x36
xg_frame_resized old native pixels 1488x1332 new native pixels 1506x1332
adjust_frame_size old native pixels 1488x1332 new native pixels 
1506x1332 old text pixels 1440x1332 new text pixels 1458x1332 old text 
chars 80x37 new text chars 81x37
     base_size 33x84 size increments 9x18 WM hint 80x36

Lucid:

EmacsFrameResize old native pixels 1492x1354 new native pixels 1492x1390
adjust_frame_size old native pixels 1492x1354 new native pixels 
1492x1390 old text pixels 1458x1296 new text pixels 1458x1332 old text 
chars 81x36 new text chars 81x37
EmacsFrameResize old native pixels 1492x1390 new native pixels 1510x1390
adjust_frame_size old native pixels 1492x1390 new native pixels 
1510x1390 old text pixels 1458x1332 new text pixels 1476x1332 old text 
chars 81x37 new text chars 82x37
EmacsFrameResize old native pixels 1510x1390 new native pixels 1510x1426
adjust_frame_size old native pixels 1510x1390 new native pixels 
1510x1426 old text pixels 1476x1332 new text pixels 1476x1368 old text 
chars 82x37 new text chars 82x38

Which is to say Lucid's log is slightly inaccurate here because, again, 
GNOME reports that window to be 81x37.

>  >> For the rest, the transcript nowhere shows that the GNOME hints jump by
>  >> two or more after 'set-face-attribute'.  Can you spot such behavior?
>  >
>  > The jumps in the log look smooth, but one set-face-attribute
>  > evaluation creates several log entries. After I resize the frame to
>  > 118x35 and evaluate the s-f-a form, all of this is printed in the log:
>  >
>  > x_new_font old char size 17x37 new char size 17x37 text chars 112x35 
> old text pixels 1904x1296 new text pixels 1904x1295
>  > xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 
> fringes 16 borders 0 text width 952 base width 32 width inc 8
>  >      char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text 
> height 647 base height 101 height inc 18
>  > xg_frame_set_char_size old native pixels 1952x1296 new native pixels 
> 1952x1295 outer pixels 976x713 outer rest 0x0
>  >      base_size 32x101 size increments 8x18 WM hint 118x34
>  > xg_frame_resized old native pixels 1952x1296 new native pixels 1952x1294
>  > adjust_frame_size old native pixels 1952x1296 new native pixels 
> 1952x1294 old text pixels 1904x1296 new text pixels 1904x1294 old text 
> chars 112x35 new text chars 112x34
>  >      base_size 32x101 size increments 8x18 WM hint 118x34
>  >
>  > x_new_font old char size 17x37 new char size 17x37 text chars 112x34 
> old text pixels 1904x1294 new text pixels 1904x1258
>  > xg_frame_set_char_size old native pixels 1952x1294 new native pixels 
> 1952x1258 outer pixels 976x695 outer rest 0x0
>  >      base_size 32x101 size increments 8x18 WM hint 118x33
>  > xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
>  > adjust_frame_size old native pixels 1952x1294 new native pixels 
> 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text 
> chars 112x34 new text chars 112x34
>  >      base_size 32x101 size increments 8x18 WM hint 118x33
>  >
>  > ...and the frame is 118x33 at the end, naturally.
> 
> This means that if you are sure that you have called it once only,
> 'set-face-attribute' manages to run set_new_font_hook twice.  Which
> would be a real pain.  Maybe someone has an idea.  Otherwise I have to
> invent a counter, increment it in 'set-face-attribute', print it in
> x_new_font, have you test it again ...

I'm pretty sure, yes. I performed that experiment and observed the log 
several times.

Would a counter really help? I guess you'll be able to confirm what I'm 
saying, but then what? Would that bring any new information?

Should we try to circle back to finding the difference between 
"InconsolataLGC" and "Inconsolata LGC"? The latter doesn't exhibit most 
of the problematic behaviors we have been discussing here.

And when s-f-a is evaluated at dimensions 118x35 with the latter family 
name, it first corrects the dimensions slightly to 118x34 (with like a 
few pixel difference in height, 2 or 3), and then no subsequent 
evaluations of s-f-a change frame dimensions, no matter how I resize it 
with a mouse first.

Visually, the resulting text seems identical between these two fonts. 
Maybe the former font name is somehow "autocorrected" into the latter? 
And that triggers some kind of callback internally that can additionally 
resize the frame?





  reply	other threads:[~2023-01-29  1:25 UTC|newest]

Thread overview: 169+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14 23:43 bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong Dmitry Gutov
2021-12-15 14:57 ` Eli Zaretskii
2021-12-15 22:43   ` Dmitry Gutov
2021-12-16  7:29     ` Eli Zaretskii
2021-12-16 13:01       ` Dmitry Gutov
2021-12-16 13:31         ` Eli Zaretskii
2021-12-16 13:42           ` Dmitry Gutov
2021-12-16 14:08             ` Eli Zaretskii
2021-12-16 14:57               ` Dmitry Gutov
2021-12-16 15:15                 ` Eli Zaretskii
2021-12-16 15:34                   ` Eli Zaretskii
2021-12-16 15:42                     ` Dmitry Gutov
2021-12-16 16:56                       ` Eli Zaretskii
2021-12-17  0:49                         ` Dmitry Gutov
2021-12-17  7:37                           ` Eli Zaretskii
2021-12-17  7:46                             ` Lars Ingebrigtsen
2021-12-17  8:38                               ` Eli Zaretskii
2022-12-21  1:14                                 ` Dmitry Gutov
2022-12-21  9:38                                   ` Gregory Heytings
2022-12-21 12:49                                     ` Eli Zaretskii
2022-12-21 23:39                                       ` Gregory Heytings
2022-12-22  7:18                                         ` Eli Zaretskii
2022-12-25 22:42                                           ` Gregory Heytings
2022-12-21 13:40                                     ` Dmitry Gutov
2022-12-21 23:39                                       ` Gregory Heytings
2022-12-22  7:20                                         ` Eli Zaretskii
2022-12-25 22:42                                           ` Gregory Heytings
2022-12-26 12:20                                             ` Eli Zaretskii
2022-12-26 14:05                                               ` Gregory Heytings
2022-12-22 20:32                                         ` Dmitry Gutov
2022-12-25 22:42                                           ` Gregory Heytings
2022-12-26  0:46                                             ` Gregory Heytings
2022-12-26 12:25                                               ` Eli Zaretskii
2022-12-29 22:45                                                 ` Gregory Heytings
2022-12-30 14:47                                                   ` Eli Zaretskii
2022-12-30 15:40                                                     ` Gregory Heytings
2022-12-30 16:14                                                       ` Eli Zaretskii
2022-12-30 16:27                                                         ` Gregory Heytings
2022-12-30 17:01                                                           ` Eli Zaretskii
2022-12-30 17:28                                                             ` Gregory Heytings
2022-12-26 15:48                                               ` Dmitry Gutov
2022-12-26 16:19                                                 ` Gregory Heytings
2022-12-27  2:04                                                   ` Dmitry Gutov
2022-12-28 15:20                                                     ` Gregory Heytings
2022-12-28 17:01                                                       ` Eli Zaretskii
2022-12-27  1:58                                             ` Dmitry Gutov
2022-12-28 15:19                                               ` Gregory Heytings
2022-12-21 12:11                                   ` Eli Zaretskii
2021-12-17 12:30                             ` Dmitry Gutov
2021-12-17 13:01                               ` Eli Zaretskii
2021-12-17 13:21                                 ` Dmitry Gutov
2021-12-17 13:46                                   ` Eli Zaretskii
2021-12-17 14:06                                     ` Dmitry Gutov
2021-12-17 14:42                                       ` Eli Zaretskii
2021-12-17 19:17                           ` martin rudalics
2022-12-21  1:08                             ` Dmitry Gutov
2022-12-21  9:22                               ` martin rudalics
2022-12-21 12:56                                 ` Dmitry Gutov
2022-12-21 17:05                                   ` martin rudalics
2022-12-21 23:00                                     ` Dmitry Gutov
2022-12-22 10:15                                       ` martin rudalics
2022-12-22 20:39                                         ` Dmitry Gutov
2022-12-23  9:14                                           ` martin rudalics
2022-12-23  9:19                                             ` martin rudalics
2022-12-23 18:48                                             ` Dmitry Gutov
2022-12-24  9:27                                               ` martin rudalics
2022-12-24 13:38                                                 ` Dmitry Gutov
2022-12-25 10:21                                                   ` martin rudalics
2022-12-25 13:01                                                     ` Dmitry Gutov
2022-12-25 16:07                                                       ` martin rudalics
2022-12-25 16:52                                                         ` Dmitry Gutov
2022-12-26  9:10                                                           ` martin rudalics
2022-12-27 23:15                                                             ` Dmitry Gutov
2022-12-28 10:08                                                               ` martin rudalics
2022-12-28 12:31                                                                 ` Dmitry Gutov
2022-12-28 17:35                                                                   ` martin rudalics
2022-12-28 22:35                                                                     ` Dmitry Gutov
2022-12-29  9:05                                                                       ` martin rudalics
2022-12-29 22:29                                                                         ` Dmitry Gutov
2022-12-30  9:51                                                                           ` martin rudalics
2022-12-31 19:01                                                                           ` martin rudalics
2023-01-05  1:50                                                                             ` Dmitry Gutov
2023-01-05  9:47                                                                               ` martin rudalics
2023-01-05 14:14                                                                                 ` Dmitry Gutov
2023-01-05 16:59                                                                                   ` martin rudalics
2023-01-05 19:08                                                                                     ` Dmitry Gutov
2023-01-06 17:47                                                                                       ` martin rudalics
2023-01-06 18:14                                                                                         ` Dmitry Gutov
2023-01-06 22:40                                                                                           ` Gregory Heytings
2023-01-06 23:45                                                                                             ` Dmitry Gutov
2023-01-06 23:49                                                                                               ` Gregory Heytings
2023-01-07  0:48                                                                                                 ` Dmitry Gutov
2023-01-07  0:50                                                                                                   ` Gregory Heytings
2023-01-07  9:48                                                                                             ` martin rudalics
2023-01-08  9:45                                                                                               ` martin rudalics
2023-01-08 22:38                                                                                               ` Gregory Heytings
2023-01-08 23:23                                                                                                 ` Gregory Heytings
2023-01-09 10:09                                                                                                 ` martin rudalics
2023-01-09 17:28                                                                                             ` Eric Abrahamsen
2023-01-07  9:15                                                                                           ` martin rudalics
2023-01-09  0:12                                                                                             ` Dmitry Gutov
2023-01-09 10:07                                                                                               ` martin rudalics
2023-01-09 20:50                                                                                                 ` Dmitry Gutov
2023-01-10 12:05                                                                                                   ` martin rudalics
2023-01-12  0:34                                                                                                     ` Dmitry Gutov
2023-01-12  9:31                                                                                                       ` martin rudalics
2023-01-12  9:46                                                                                                         ` Robert Pluim
2023-01-12 10:23                                                                                                           ` martin rudalics
2023-01-12 23:53                                                                                                           ` Dmitry Gutov
2023-01-13  0:36                                                                                                         ` Dmitry Gutov
2023-01-13  8:38                                                                                                           ` martin rudalics
2023-01-16  1:27                                                                                                             ` bug#60585: 30.0.50; global-text-scale-adjust shrinks window (was not before), was: " Dmitry Gutov
2023-01-16 10:03                                                                                                               ` martin rudalics
2023-01-16 12:44                                                                                                                 ` Dmitry Gutov
2023-01-16 16:10                                                                                                                   ` martin rudalics
2023-01-17  1:54                                                                                                                     ` Dmitry Gutov
2023-01-17 10:04                                                                                                                       ` martin rudalics
2023-01-17 17:35                                                                                                                         ` Dmitry Gutov
2023-01-18 17:13                                                                                                                           ` martin rudalics
2023-01-21  3:12                                                                                                                             ` Dmitry Gutov
2023-01-21 10:08                                                                                                                               ` martin rudalics
2023-01-22  1:56                                                                                                                                 ` Dmitry Gutov
2023-01-22  9:54                                                                                                                                   ` martin rudalics
2023-01-22 22:25                                                                                                                                     ` Dmitry Gutov
2023-01-24 10:50                                                                                                                                       ` martin rudalics
2023-01-25  4:20                                                                                                                                         ` Dmitry Gutov
2023-01-26 15:44                                                                                                                                           ` martin rudalics
2023-01-27  3:07                                                                                                                                             ` Dmitry Gutov
2023-01-27  9:35                                                                                                                                               ` martin rudalics
2023-01-28  0:22                                                                                                                                                 ` Dmitry Gutov
2023-01-28 15:36                                                                                                                                                   ` martin rudalics
2023-01-29  1:25                                                                                                                                                     ` Dmitry Gutov [this message]
2023-01-30  9:28                                                                                                                                                       ` martin rudalics
2023-02-09 19:40                                                                                                                                                         ` Dmitry Gutov
2023-02-11  1:36                                                                                                                                                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11  8:17                                                                                                                                                             ` Eli Zaretskii
2023-02-11  9:30                                                                                                                                                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 10:39                                                                                                                                                                 ` Eli Zaretskii
2023-02-11 10:15                                                                                                                                                             ` Dmitry Gutov
2023-02-11 10:22                                                                                                                                                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 22:08                                                                                                                                                                 ` Dmitry Gutov
2023-02-12  1:45                                                                                                                                                                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-12  2:06                                                                                                                                                                     ` Dmitry Gutov
2023-02-12  3:26                                                                                                                                                                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-12 12:41                                                                                                                                                                         ` Dmitry Gutov
2023-02-13  2:56                                                                                                                                                                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-16  2:09                                                                                                                                                                             ` Dmitry Gutov
2023-02-16  3:00                                                                                                                                                                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-16 22:18                                                                                                                                                                                 ` Dmitry Gutov
2023-02-17  2:43                                                                                                                                                                                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-17 11:54                                                                                                                                                                                     ` Dmitry Gutov
2023-02-12 12:55                                                                                                                                                                         ` Dmitry Gutov
2023-02-13 10:09                                                                                                                                                           ` martin rudalics
2023-02-17  2:05                                                                                                                                                             ` Dmitry Gutov
2023-02-20  9:05                                                                                                                                                               ` martin rudalics
2023-02-22  1:42                                                                                                                                                                 ` Dmitry Gutov
2023-02-24 17:54                                                                                                                                                                   ` martin rudalics
2023-02-27  1:29                                                                                                                                                                     ` Dmitry Gutov
2022-12-21 13:43                                 ` Dmitry Gutov
2022-12-24  1:03                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24  8:52                               ` martin rudalics
2022-12-24  9:39                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24 10:45                                   ` martin rudalics
2022-12-24 11:24                                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24 13:02                                       ` Dmitry Gutov
2022-12-25 22:52                           ` Gregory Heytings
2021-12-16 15:36                   ` Dmitry Gutov
2021-12-16 16:54                     ` Eli Zaretskii
2021-12-17  0:13                       ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=309dcf34-b553-58c2-34a5-270028b05347@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=60585@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=rpluim@gmail.com \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.