From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Default face problem Date: Mon, 01 May 2006 10:25:54 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146472091 30662 80.91.229.2 (1 May 2006 08:28:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 May 2006 08:28:11 +0000 (UTC) Cc: wilde@sha-bang.de, jyavner@member.fsf.org, rms@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 01 10:28:08 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaTlG-0004NI-Lo for ged-emacs-devel@m.gmane.org; Mon, 01 May 2006 10:28:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaTlF-0006le-S7 for ged-emacs-devel@m.gmane.org; Mon, 01 May 2006 04:28:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaTkz-0006jv-BC for emacs-devel@gnu.org; Mon, 01 May 2006 04:27:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaTkx-0006jj-79 for emacs-devel@gnu.org; Mon, 01 May 2006 04:27:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaTkx-0006jg-01 for emacs-devel@gnu.org; Mon, 01 May 2006 04:27:47 -0400 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FaTog-0004Lm-Es; Mon, 01 May 2006 04:31:38 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepb.post.tele.dk (Postfix) with SMTP id 4B7C1A50035; Mon, 1 May 2006 10:27:38 +0200 (CEST) Original-To: Kenichi Handa In-Reply-To: (Kenichi Handa's message of "Mon, 01 May 2006 11:41:18 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:53715 Archived-At: Kenichi Handa writes: > In article , storm@cua.dk (Kim F. Storm) writes: > >> storm@cua.dk (Kim F. Storm) writes: >>> Sascha Wilde writes: >>> >>>>>> I still do see a heavy misalignment of the header line in ses (with >>>>>> X11), but only when using a font with an odd size >>>>>> (-*-terminus-medium-r-*-*-17-*-*-*-*-*-iso8859-1 here). >>> >>> I see it too. >>> >>> If I customize the default face, and change the height from 99 to 100, >>> it works again. I'll look into what's wrong. > > This is because the current Emacs refuses to use an > auto-scaled font because it's usually too agree to use for > the editing work. Thanks for the explanation. I think I understand. But why does it think it is ok to use such a font as the frame's default font? The problem we see is because the :align-to specs in the header line are formatted based on the width of the frame's default font, but if the default font is not used in the frame text, the result is very confusing. > It at first checks the availability of > the specified font (without checking it's auto-scaled or > not), but, later on deciding a font for a face, it lists > fonts matching with family-name and registry-name, then > selects the best one among them. Wouldn't it make sense to fix the frame's default font at this step (eg. in realize_basic_faces) when it is detected that the specified default font is "not available". The test could be something like this (pseudo-code) inserted just after realizing the default face: if (frame->default_face->font != frame->default_font) frame->default_font = frame->default_face->font; > On this selection, > auto-scaled font is refused even if scalable-fonts-allowed > is non-nil. So, in your case the 16-dots font (that is > surely included in terminus font package) is selected. -- Kim F. Storm http://www.cua.dk