From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: Default font has size 12pixels when requested 13pixels Date: Fri, 15 Feb 2008 21:40:38 +0000 Message-ID: <47B606D6.7090005@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1203111729 29552 80.91.229.12 (15 Feb 2008 21:42:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Feb 2008 21:42:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 15 22:42:32 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 1JQ8JF-0002MI-Eu for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2008 22:41:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JQ8Il-0008TW-En for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2008 16:40:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JQ8IX-0008Jf-PD for emacs-devel@gnu.org; Fri, 15 Feb 2008 16:40:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JQ8IV-0008HU-TH for emacs-devel@gnu.org; Fri, 15 Feb 2008 16:40:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JQ8IV-0008HB-JB for emacs-devel@gnu.org; Fri, 15 Feb 2008 16:40:43 -0500 Original-Received: from mk-outboundfilter-3.mail.uk.tiscali.com ([212.74.114.23]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JQ8IV-0004Q7-8Q for emacs-devel@gnu.org; Fri, 15 Feb 2008 16:40:43 -0500 Original-X-Trace: 41799103/mk-outboundfilter-1.mail.uk.tiscali.com/F2S/$ACCEPTED/freedom2Surf-customers/83.67.23.108 X-SBRS: None X-RemoteIP: 83.67.23.108 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAEOVtUdTQxds/2dsb2JhbAAIrls X-IP-Direction: OUT Original-Received: from i-83-67-23-108.freedom2surf.net (HELO [127.0.0.1]) ([83.67.23.108]) by smtp.f2s.tiscali.co.uk with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 Feb 2008 21:40:42 +0000 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: 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:89179 Archived-At: Stefan Monnier wrote: > 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. > This sounds similar to the problem I was having a couple of weeks back, which I tracked to some changes to font.c installed on the emacs-unicode-2 branch between 2008-01-22 and 2008-01-25 to fix the problems being discussed with the subject "Unicode-2 crash by set-face-font". One of the fixes was to stop using a previously created font->font_object, and instead recreate the font using font->full_name. On Windows, the full names were not parsable by the font creation code, so the size was being lost in that recreation. 12 pixels is hard-coded somewhere in font.c as a fallback size. Although in your case, it looks like the full_name is being filled in a format that Emacs can parse, I suspect it may still be the same code that is causing the problem.