From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#3228: 23.0.93; GTK font selection: asked for Courier, got Nimbus Date: Mon, 18 May 2009 21:42:03 +0900 Message-ID: References: <87eiv23bz6.fsf@turtle.gmx.de> <87prelidmt.fsf@turtle.gmx.de> <87bpq4932u.fsf@turtle.gmx.de> <87r5z086mm.fsf@turtle.gmx.de> Reply-To: Kenichi Handa , 3228@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1242651140 14226 80.91.229.12 (18 May 2009 12:52:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 May 2009 12:52:20 +0000 (UTC) Cc: 3228@emacsbugs.donarmstrong.com To: Sven Joachim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 18 14:52:13 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M62KA-0007qi-TU for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 May 2009 14:52:12 +0200 Original-Received: from localhost ([127.0.0.1]:37941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M62K9-0002Gj-U6 for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 May 2009 08:52:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M62K4-0002GP-6r for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 08:52:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M62Jz-0002Fb-M4 for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 08:52:03 -0400 Original-Received: from [199.232.76.173] (port=42562 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M62Jz-0002FY-H2 for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 08:51:59 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37593) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M62Jy-0004ps-Uz for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 08:51:59 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4ICpura011682; Mon, 18 May 2009 05:51:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n4ICo4CE010469; Mon, 18 May 2009 05:50:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 18 May 2009 12:50:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3228 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3228-submit@emacsbugs.donarmstrong.com id=B3228.12426505158837 (code B ref 3228); Mon, 18 May 2009 12:50:03 +0000 Original-Received: (at 3228) by emacsbugs.donarmstrong.com; 18 May 2009 12:41:55 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4ICfpK9008825 for <3228@emacsbugs.donarmstrong.com>; Mon, 18 May 2009 05:41:52 -0700 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n4ICfn53026746; Mon, 18 May 2009 21:41:49 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n4ICfntk024648; Mon, 18 May 2009 21:41:49 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id n4ICfngm012157; Mon, 18 May 2009 21:41:49 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1M62AN-0001ZH-SD; Mon, 18 May 2009 21:42:03 +0900 In-reply-to: <87r5z086mm.fsf@turtle.gmx.de> (message from Sven Joachim on Fri, 08 May 2009 08:13:05 +0200) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 18 May 2009 08:52:03 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:27965 Archived-At: Sorry for the late response. In article <87r5z086mm.fsf@turtle.gmx.de>, Sven Joachim writes: > On 2009-05-08 03:49 +0200, Kenichi Handa wrote: > > In article <87bpq4932u.fsf@turtle.gmx.de>, Sven Joachim writes: > > >>> Yes, /usr/share/fonts/X11/Type1/fonts.alias defines these aliases: > > >>> -adobe-courier-medium-r-normal--0-0-0-0-p-0-iso8859-1 "-urw-nimbus mono l-regular-r-normal--0-0-0-0-p-0-iso8859-1" > > > > Ok, I see. It seems that the problem here is this: > > > > o menu-set-font returns the font name "courier 12"; i.e no > > information about spacing, dpi > > o no bitmap courier font has the exact pixelsize for 12pt on your screen. > > o so Emacs selected a scalable font, that is the above "nimbus mono l" font. > > > > I think "% emacs -fn courier-12" will also select the > > "nimbus mono l" font in this environment. > Indeed. > > Please try: > > M-x set-default-font RET courier-12:spacing=m RET > > > > Doesn't it select a bitmap font, perhaps the same one as this > > startup font? > > > > xft:-Adobe-Courier-normal-normal-normal-*-17-*-*-*-m-100-iso10646-1 > That font is selected then, yes. I've just installed a fix to handle :type property of font correctly in set-face-attribute. So, this problem can be solved by modifying x-select-font (called from menu-set-font) to return a font-spec (with a proper font-backend name in :type) instead of font-name. But, x-select-font is called from mouse-appearance-menu (in mouse.el) too, and it does something like this: (buffer-face-mode-invoke (font-face-attributes (x-select-font)) ...) and thus the :type information is lost by font-face-attributes. I don't know why we need font-face-attributes here. By the way, if a user is using `x' font-backend only, we should not use x-select-font (of xfns.c) because the selected font is usually not usable. --- Kenichi Handa handa@m17n.org