Subject: bug#10178: 24.0.92; emacs -q frame too short for fancy splash image

From: Stephen Berman <[email-masked]>
Date: Sat, 10 Dec 2011 16:13:20 +0100

On Sat, 10 Dec 2011 14:13:25 +0100 Jan Djärv <[email-masked]> wrote:

> 7 dec 2011 kl. 22:54 skrev Stephen Berman:
[...]
>> I just installed my GNU/Linux distribution's (openSUSE 12.1) Emacs 23.3,
>> and it shows the same behavior as my build from the trunk: no fancy splash
>> image with -q, frame-height = 35, image-size returns (38.57142857142857
>> . 15.5).  With Emacs 23.2 from openSUSE 11.4, emacs -q does display the
>> splash image.  Could this have to do with the GTK+ version (2.24.7 in
>> openSUSE 12.1)?
>
> I doubt it, as Gtk+ is not used for any font metrics or image handling (except
> for tool bar images).  But different versions of freetype2 and/or the image
> libraries might influence this.
>
> With your font (-unknown-DejaVu Sans
> Mono-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1, aka monospace-9) i get:
>
> (38.57142857142857 . 14.466666666666667)
>
> So the width is the same as what you get, but the height differs.  Strange.
>
> Does (image-size (create-image "splash.xpm") t) return (270 . 217) ?

Yes.

> Go to *scratch* and evaluate (assuming there is a character at pos 1):
>
> (font-info (font-at 1))
>
> It should return:
>
> ["-unknown-DejaVu Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1"
> "DejaVu Sans
> Mono:pixelsize=12:foundry=unknown:weight=normal:slant=normal:width=normal:spacing=100:scalable=true"
> 12 15 0 0 0]

I get:

["-unknown-DejaVu Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1" "DejaVu Sans Mono:pixelsize=12:foundry=unknown:weight=normal:slant=normal:width=normal:spacing=100:scalable=true" 12 14 0 0 0]

> 15 is the font height (i.e. 217 / 15 = 14.466666...).  Do you have that?

No, but 217/14 = 15.5, which is what image-size shows here.

I have DejaVu version 2.33, Freetype2 version 2.4.7, and
xorg-x11-libXpm-devel version 7.6.

Steve Berman