From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bertrand Petit Newsgroups: gmane.emacs.bugs Subject: Bug in frame's font parameter Date: Tue, 16 Mar 2004 12:33:37 +0100 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <20040316113337.GC33266@memo.frmug.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KsGdsel6WgEHnImy" X-Trace: sea.gmane.org 1079437142 18356 80.91.224.253 (16 Mar 2004 11:39:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Mar 2004 11:39:02 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 16 12:38:54 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B3CuL-0006yg-00 for ; Tue, 16 Mar 2004 12:38:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B3CrN-0004We-GB for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Mar 2004 06:35:49 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B3CqK-0004JO-2K for bug-gnu-emacs@gnu.org; Tue, 16 Mar 2004 06:34:44 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B3Cpm-00047S-7l for bug-gnu-emacs@gnu.org; Tue, 16 Mar 2004 06:34:41 -0500 Original-Received: from [193.56.58.252] (helo=lists.frmug.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B3Cpl-00045U-G9 for bug-gnu-emacs@gnu.org; Tue, 16 Mar 2004 06:34:09 -0500 Original-Received: by lists.frmug.org (Postfix/TLS, from userid 66) id C939920F3C; Tue, 16 Mar 2004 12:34:03 +0100 (CET) Original-Received: (from elrond@localhost) by memo.frmug.org (8.11.6/8.11.6) id i2GBXbO33582 for bug-gnu-emacs@gnu.org; Tue, 16 Mar 2004 12:33:37 +0100 (CET) (envelope-from emacs@memo.frmug.org) X-Authentication-Warning: memo.frmug.org: elrond set sender to emacs@memo.frmug.org using -f Original-To: bug-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: Mutt/1.4.2i X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:7291 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:7291 --KsGdsel6WgEHnImy Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline See the comments in the joined elisp file for details. -- %!PS 297.6 420.9 translate 90 rotate 0 setgray gsave 0 1 1{pop 0 180 moveto 100 180 170 100 170 -10 curveto 180 -9 180 -9 190 -10 curveto 190 100 100 180 0 180 curveto fill 180 rotate}for grestore/Bookman-LightItalic findfont 240 scalefont setfont -151.536392 -63.7998886 moveto (bp)show showpage --KsGdsel6WgEHnImy Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline; filename="font-parameter-demo.el" ;; Frame's font parameter demonstration. ;; The trouble reside in a frame's font parameter when a font is ;; specified in the default-frame-alist using wildcards. For the first ;; frame created by emacs, the font parameter is the same as the ;; specifications (ie wildcarded), while for subsequent frames the ;; parameter is the real XLFD of the used font. This behavior diverges ;; from emacs 20 and is unexpected. ;; Test it using "emacs -q -no-site-file -l font-parameter-demo.el" ;; Following is the output I got: ;; (emacs-version) ;; ==> "GNU Emacs 21.3.1 (i386-unknown-freebsd4.5, X toolkit) ;; of 2004-02-25 on memo.frmug.org" ;; (assoc (quote font) default-frame-alist) ;; ==> (font . "-b&h-luxi mono-medium-r-normal-*-*-130-*-*-m-*-iso8859-1") ;; (frame-parameter (selected-frame) (quote font)) ;; ==> "-b&h-luxi mono-medium-r-normal-*-*-130-*-*-m-*-iso8859-1" ;; (face-attribute (quote default) :font) ;; ==> "-b&h-luxi mono-medium-r-normal--14-130-75-75-m-80-iso8859-1" ;; *** Again on a new frame ;; (frame-parameter (selected-frame) (quote font)) ;; ==> "-b&h-luxi mono-medium-r-normal--14-130-75-75-m-80-iso8859-1" ;; (face-attribute (quote default) :font) ;; ==> "-b&h-luxi mono-medium-r-normal--14-130-75-75-m-80-iso8859-1" (setq default-frame-alist '((font . "-b&h-luxi mono-medium-r-normal-*-*-130-*-*-m-*-iso8859-1"))) (setq initial-frame-alist default-frame-alist) (setq the-first-frame (selected-frame)) (defmacro eval-print (expr) `(progn (prin1 (quote ,expr)) (terpri) (princ "==> ") (prin1 ,expr) (terpri))) (defun bug-case () (interactive) (setq standard-output (get-buffer-create "*test-output*")) (switch-to-buffer standard-output) (if (eq (selected-frame) the-first-frame) (progn (eval-print (emacs-version)) (eval-print (assoc 'font default-frame-alist)))) (eval-print (frame-parameter (selected-frame) 'font)) (eval-print (face-attribute 'default :font)) (if (eq (selected-frame) the-first-frame) (progn (princ "*** Again on a new frame") (terpri) (select-frame (make-frame '((background-color . "bisque")))) (bug-case)))) (add-hook 'window-setup-hook 'bug-case t) ;; EOF --KsGdsel6WgEHnImy Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-gnu-emacs mailing list Bug-gnu-emacs@gnu.org http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs --KsGdsel6WgEHnImy--