GNU bug report logs - #52493
29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Tue, 14 Dec 2021 23:45:01 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Dmitry Gutov <dgutov <at> yandex.ru>, Eli Zaretskii <eliz <at> gnu.org>
Cc: rpluim <at> gmail.com, 52493 <at> debbugs.gnu.org
Subject: bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
Date: Thu, 12 Jan 2023 10:31:35 +0100
> So... the window manager works with "unscaled" pixels it has to multiply by 2? That's why we try to send half the actual value?

We send half the actual value because Robert (IIRC) has coded it that
way.  I never scale here and so I can't tell whether that's the right
approach.  Have a look at Bug#20432 where Jan says something about GTK
messing things up.

> I was talking about the Scenario 3: the frame dimensions (pixelwise) didn't change in it.

Please tell me precisely where it didn't change.  The only cases where
it did not change are the last two lines below.  And these represent the
cases we wanted to fix.


adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
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 base width 33 width inc 9
    char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
    char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 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

x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
    char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 88 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 874x880 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1748x1628
adjust_frame_size old native pixels 1488x1296 new native pixels 1748x1628 old text pixels 1440x1296 new text pixels 1700x1628 old text chars 80x36 new text chars 80x36

x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1700x1628 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
    char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1748x1628 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
xg_frame_resized old native pixels 1748x1628 new native pixels 1424x1368
adjust_frame_size old native pixels 1748x1628 new native pixels 1424x1368 old text pixels 1700x1628 new text pixels 1376x1368 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1424x1368 new native pixels 1408x1368
adjust_frame_size old native pixels 1424x1368 new native pixels 1408x1368 old text pixels 1376x1368 new text pixels 1360x1368 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1408x1368 new native pixels 1408x1332
adjust_frame_size old native pixels 1408x1368 new native pixels 1408x1332 old text pixels 1360x1368 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36

x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332

x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332


> Thank you, but I'm not sure my work is particularly affected by
> it. Having the frame width settle on 80 chars is pretty nice, I
> suppose, but after that I usually maximize the frame anyway. Or make
> it take half the screen.

Make it take half the screen?  This works here (xfwm4) only with
'frame-resize-pixelwise' enabled.

> It would be nice, though, to avoid the frame size contortions during
> startup. I think it goes through 4 different sizes, at least. This
> patch doesn't seem to change the number of transitions, however.

Conceptually, most of these contortions should happen with a yet
invisible frame.  Also, font-related contortions are a pain because
(IIUC) it takes some time to get the size of the default font as
specified by the user's init file.  If Emacs were to start with a fixed
initial pixel size, things were easier.  After all, Emacs is the only
application I know that specifies the size of the initial window WRT
some user specified font.

But don't worry: When you are using a separate minibuffer frame, Emacs
will start with one frame, create two additional ones and delete the
first one afterwards.  That's what I call real contortions.

> If you send the patch together with a commit message, I can install it
> no problem (to the release branch or to master, whatever it deemed to
> be the best in this case).

I'll try to come up with a few comments in the code so you can install
it on master.  We might be able to simplify it later using the idea I
had for Bug#60585.  But there so far I was not able to convince anyone
of trying the patch I sent - and that one is much more involved.

martin




This bug report was last modified 2 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.