From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Default font has size 12pixels when requested 13pixels Date: Mon, 18 Feb 2008 13:30:28 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203359449 3004 80.91.229.12 (18 Feb 2008 18:30:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Feb 2008 18:30:49 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 18 19:31:13 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JRAlh-0001Yu-Fw for ged-emacs-devel@m.gmane.org; Mon, 18 Feb 2008 19:31:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRAlC-0001R9-Pu for ged-emacs-devel@m.gmane.org; Mon, 18 Feb 2008 13:30:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRAl8-0001QF-JN for emacs-devel@gnu.org; Mon, 18 Feb 2008 13:30:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRAl7-0001Q0-0Y for emacs-devel@gnu.org; Mon, 18 Feb 2008 13:30:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRAl6-0001Px-SP for emacs-devel@gnu.org; Mon, 18 Feb 2008 13:30:32 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRAl6-0001Zj-SY for emacs-devel@gnu.org; Mon, 18 Feb 2008 13:30:33 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAEdduUfO+KMJdGdsb2JhbACQVgEwnDWBAg X-IronPort-AV: E=Sophos;i="4.25,372,1199682000"; d="scan'208";a="14669524" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 18 Feb 2008 13:30:30 -0500 Original-Received: from pastel.home ([206.248.163.9]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id YUW28530; Mon, 18 Feb 2008 13:30:30 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 642688153; Mon, 18 Feb 2008 13:30:28 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Fri, 15 Feb 2008 15:48:21 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:89505 Archived-At: > My default font is specified via X resources: > Emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-*-*-*-* > yet with the new font-backend, I get the 12-pixel version of that font > (which happens to be a *lot* smaller). I believe I've tracked it down to a thinko/typo fixed by the patch below, Stefan Index: src/font.c =================================================================== RCS file: /sources/emacs/emacs/src/font.c,v retrieving revision 1.6 diff -u -r1.6 font.c --- src/font.c 17 Feb 2008 02:03:58 -0000 1.6 +++ src/font.c 18 Feb 2008 18:29:40 -0000 @@ -1167,7 +1167,8 @@ len += sprintf (f[XLFD_PIXEL_INDEX], "%d-*", i) + 1; else if (pixel_size > 0) len += sprintf (f[XLFD_PIXEL_INDEX], "%d-*", pixel_size) + 1; - f[XLFD_PIXEL_INDEX] = "*-*", len += 4; + else + f[XLFD_PIXEL_INDEX] = "*-*", len += 4; } else if (FLOATP (val)) {