Subject: bug#2476: 23.0.90; menu-set-font produces bold oblique font

From: Stephen Berman <[email-masked]>
Date: Thu, 26 Feb 2009 00:43:44 +0100

1. emacs -Q
2. Sanity check:
   a. Typing `C-u C-x =' on a character shows this font:
      xft:-unknown-DejaVu Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1
      (I have this in ~/.Xresources:
       Emacs.FontBackend: xft
       Emacs.Font: DejaVu Sans Mono-10)
   b. Move the mouse pointer over a tool bar icon or the mode line until
      a tooltip is displayed, and observe that it has it normal face
      (variable-pitch, normal weight and slant).
3. Click on the menu bar entry Options->Set Default Font... In my GTK+
   build this opens a "Pick a font" dialog, showing Family: DejaVu Sans
   Mono, Style: Book, Size: 10.
4. Change at least one of the font attributes family or size,
   e.g. change size to 9 (but leave the style unchanged).
5. I now observe the following:
   a. Typing `C-u C-x =' on a character shows this font:
      xft:-unknown-DejaVu Sans Mono-bold-oblique-normal-*-11-*-*-*-m-0-iso10646-1
      The characters in this frame are indeed smaller, yet they still
      show normal weight and slant; however
   b. all the characters in tooltips show bold weight and oblique slant,
      and
   c. Typing `C-x 5 2' creates a frame in which all the characters show
      bold weight and oblique slant, in the buffer as well as in
      tooltips.

I observe this behavior also with emacs -Q -xrm 'Emacs.FontBackend: x'

In GNU Emacs 23.0.90.4 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
 of 2009-02-20 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t