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: Dmitry Gutov <dgutov <at> yandex.ru>
To: martin rudalics <rudalics <at> gmx.at>, 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: Fri, 23 Dec 2022 20:48:47 +0200
[Message part 1 (text/plain, inline)]
On 23/12/2022 11:14, martin rudalics wrote:
>  > I'm not sure if you caught one of my previous messages, however, so 
> I'd like to repeat:
>  >
>  > The problem is easily repeatable in the above scenario. But not if I 
> change "InconsolataLGC" to "Inconsolata LGC". Then the resizing stops 
> after the first iteration.
>  >
>  > In either case, 'M-x describe-face RET default' shows "Family: 
> Inconsolata LGC", though. So it's not like "InconsolataLGC" is entirely 
> unrecognized.
> 
> Does it matter?  Whatever you do - have the same form evaluated twice in
> a row causing a frame resize must be a bug - somewhere.

Yep.

I just figured that it might give you ideas as to the cause and/or 
affect the priority of having this fixed.

>  > Anyway, here's the log (evaled the form 3 times):
>  >
>  > adjust_frame_size .. pixel_height .. 25 .. text_height .. 24
>  > adjust_frame_size .. pixel_height .. 900 .. text_height .. 900
>  > adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
>  > adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
>  > xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 43 .. 
> height_inc .. 18
>  > xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 84 .. 
> height_inc .. 18
> 
> We start here
> 
>  > set-face-attribute
>  > xg_wm_set_size_hint .. line_height .. 45 .. base_height .. 88 .. 
> height_inc .. 22
> 
> and come up with a frame line height of 45 pixels and an increment hint
> of 22 which means that some scaling (by 2 apparently) is in effect here.
> Honestly, I have no idea how this is supposed to work.

2x scaling, yes (I have a 4K display).

>  > adjust_frame_size .. pixel_height .. 1584 .. text_height .. 1584
>  > xg_wm_set_size_hint .. line_height .. 37 .. base_height .. 84 .. 
> height_inc .. 18
> 
> Here we ask for the same (due to rounding) increment ...
> 
>  > adjust_frame_size .. pixel_height .. 1260 .. text_height .. 1260
>  > set-face-attribute
>  > adjust_frame_size .. pixel_height .. 1224 .. text_height .. 1224
>  > adjust_frame_size .. pixel_height .. 1188 .. text_height .. 1188
>  > set-face-attribute
>  > adjust_frame_size .. pixel_height .. 1152 .. text_height .. 1152
>  > adjust_frame_size .. pixel_height .. 1116 .. text_height .. 1116
> 
> ... but then we do not set hints any more so it seems that we do all the
> shrinking ourselves - just how can we shrink and not send size hints at
> the same time is yet a mystery to me.
> 
> Please run again with the new patch but also evaluate
> 
> (setq frame-size-history '(100))
> 
> Then perform some 'set-face-attribute' calls, evaluate
> 
> (frame--size-history)
> 
> and get me the contents of both buffers *foo* and *frame-size-history*.

Here you go, both attached.

I called set-face-attributes 8 times, might have got a little 
over-enthusiastic.
[foo.txt (text/plain, attachment)]
[frame-size-history.txt (text/plain, attachment)]

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.