# HG changeset patch # User Chong Yidong # Date 1235747587 0 # Node ID 473a26ad93a94d2d63bb43b91f4c533c217c3187 # Parent d54a31f60e541ccc098a32ddf09d7d675bffdaae (menu-set-font): Fix last fix. diff -r d54a31f60e54 -r 473a26ad93a9 lisp/menu-bar.el --- a/lisp/menu-bar.el Fri Feb 27 15:12:46 2009 +0000 +++ b/lisp/menu-bar.el Fri Feb 27 15:13:07 2009 +0000 @@ -637,16 +637,14 @@ (mouse-select-font))) spec) (when font - ;; We used to call set-face-attribute with a nil argument here, - ;; but this does the wrong thing (Bug#2476). The reason is - ;; subtle: when Emacs looks for a font matching the `font' - ;; argument, it tries to guess the best matching font by - ;; examining the other face attributes. The attributes for - ;; future frames are generally unspecified, so this matching - ;; process works poorly. What we do instead is assign `font' to - ;; the selected frame, then use that font object and assign it - ;; to all other frames (and to future frames). - (set-face-attribute 'default (selected-frame) :font font) + ;; Be careful here: when set-face-attribute is called for the + ;; :font attribute, Emacs tries to guess the best matching font + ;; by examining the other face attributes (Bug#2476). + (set-face-attribute 'default (selected-frame) + :width 'normal + :weight 'normal + :slant 'normal + :font font) (let ((font-object (face-attribute 'default :font))) (dolist (f (frame-list)) (and (not (eq f (selected-frame)))