Subject: Re: bug#25228: 25.1; GNU emacs 25.1: custom-set-faces from init file ~/.emacs ignored

From: martin rudalics <[email-masked]>
Date: Thu, 22 Dec 2016 09:35:07 +0100

> The patch works! The font-height stays the same.

Installed now for Emacs 25.2.

 > FYI - this is most probably unrelated to the font-height problem, anyway:
 > 1. On my "font-height-works" machine (Ubuntu 16.10) the first invocation of:
 >      ./src/emacs -q --eval "(set-face-attribute 'default nil :height 40)" &
 > creates a rather small frame (I mean gtk window).

With 40 lines though.  What did you expect?

 > The consequent
 > invocations of this
 > command create frames of normal size.

With "consequent invocations" you mean what?  C-x 5 2 here creates yet
another frame of the same size.  The size of the initial frame is
derived from the ‘height’ and ‘width’ frame parameters, if specified,
and the height of the default font.

 > 2. On my "font-height-works" machine the command above produces warnings:
 >
 > ** (emacs:21762): WARNING **: Couldn't connect to accessibility bus:
 > Failed to connect to socket /tmp/dbus-CV9wAFvBnL: Connection refused

No ideas about this one.

 > (emacs:21762): Gtk-CRITICAL **: gtk_distribute_natural_allocation:
 > assertion 'extra_space >= 0' failed
 >
 > where the "... Gtk-CRITICAL ..." line gets repeated

gtk_distribute_natural_allocation is a pain.  You could try to set
‘frame-resize-pixelwise’ to t but I doubt that it will help.

 > 3. On my "font-height-buggy" machine (Ubuntu 16.10 in VirtBox under Windows 7) I
 > always get small frames of the same size and I never see any Gtk errors or
 > warnings.

The Windows API has no idea of window sizes based on the metrics of some
default font.  The "round frame sizes to multiples of the default font
height" paradigm is among the most irksome legacies the Emacs frame code
has to deal with.

martin