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: Default font has size 12pixels when requested 13pixels Date: Fri, 15 Feb 2008 15:48:21 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203108525 18678 80.91.229.12 (15 Feb 2008 20:48:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Feb 2008 20:48:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 15 21:49:08 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 1JQ7UT-0007r5-EY for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2008 21:49:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JQ7Tz-0006Dg-CY for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2008 15:48:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JQ7Tu-0006D7-En for emacs-devel@gnu.org; Fri, 15 Feb 2008 15:48:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JQ7Ts-0006Co-Re for emacs-devel@gnu.org; Fri, 15 Feb 2008 15:48:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JQ7Ts-0006Cl-M7 for emacs-devel@gnu.org; Fri, 15 Feb 2008 15:48:24 -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 1JQ7Ts-0001qy-Ax for emacs-devel@gnu.org; Fri, 15 Feb 2008 15:48:24 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAE+JtUdMCpRc/2dsb2JhbACSIZxFgQI X-IronPort-AV: E=Sophos;i="4.25,360,1199682000"; d="scan'208";a="14562395" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 15 Feb 2008 15:48:22 -0500 Original-Received: from pastel.home ([76.10.148.92]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id VWL55022; Fri, 15 Feb 2008 15:48:22 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 33539849F; Fri, 15 Feb 2008 15:48:21 -0500 (EST) 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:89177 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'm trying to track down what's going on, but am having some trouble. I see the point-size of my faces going from 99 (corresponding to the desired 13 pixels) to 91 (corresponding to 12 pixels) at some point, but still can't quite figure out where that happens. I run Emacs, placing a breakpoint on realize_default_face, and the second call to that function seems to be the culprit. One troubling spot comes up as follows: during this second call, when the function calls font_find_object (around xfaces.c:7469) I see that the returned frame_font has the following content: (gdb) p frame_font $182 = { i = 1754152016, s = { val = 143539280, type = Lisp_Misc }, u = { val = 143539280, type = Lisp_Misc } } (gdb) xsavevalue $183 = (struct Lisp_Save_Value *) 0x88e3c50 (gdb) p *$183 $184 = { type = Lisp_Misc_Save_Value, gcmarkbit = 0, spacer = 0, dogc = 0, pointer = 0x9191a20, integer = 1 } (gdb) p *(struct font*)$183->pointer $185 = { font = { font = 0x9191080, font_idx = 152641048, name = 0x9191e20 "-misc-fixed-medium-r-semicondensed--*-*-75-75-c-60-koi8-r", full_name = 0x9194b80 "-Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-KOI8-R", charset = 73, size = 6, height = 12, space_width = 6, average_width = 6, vertical_centering = 0, encoding_type = 128 '\200', baseline_offset = 0, relative_compose = 0, default_ascent = 0, font_encoder = 0x40 }, entity = { i = 2831330056, s = { val = 146975496, type = Lisp_Vectorlike }, u = { val = 146975496, type = Lisp_Vectorlike } }, pixel_size = 13, driver = 0x8891f60, format = { i = 1217384936, s = { val = 143643112, type = Lisp_Symbol }, u = { val = 143643112, type = Lisp_Symbol } }, file_name = 0x0, encoding_charset = 73, repertory_charset = 73, min_width = 6, ascent = 10, descent = 2, scalable = 0 } (gdb) Of course I have no idea where this "-Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-KOI8-R", and interestingly this "struct font" says both that its height is 12 (presumably pixels) and that it has pixel size 13. Can anybody give me a hand here? Stefan