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: Default face problem [was: Re: incomplete header-line with 3d boxes and prop fonts] Date: Fri, 28 Apr 2006 13:34:08 +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 1146224231 25100 80.91.229.2 (28 Apr 2006 11:37:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Apr 2006 11:37:11 +0000 (UTC) Cc: Jonathan Yavner , 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 Fri Apr 28 13:37:07 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 1FZRHP-0003Px-6F for ged-emacs-devel@m.gmane.org; Fri, 28 Apr 2006 13:36:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZRHO-0001zU-FA for ged-emacs-devel@m.gmane.org; Fri, 28 Apr 2006 07:36:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FZRGW-0001Wa-TO for emacs-devel@gnu.org; Fri, 28 Apr 2006 07:36:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FZRGV-0001VE-7r for emacs-devel@gnu.org; Fri, 28 Apr 2006 07:36:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZRGV-0001V6-4E for emacs-devel@gnu.org; Fri, 28 Apr 2006 07:36:03 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FZRJZ-0001Ai-Ao; Fri, 28 Apr 2006 07:39:13 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id 52B68FAC02E; Fri, 28 Apr 2006 13:35:56 +0200 (CEST) Original-To: Sascha Wilde In-Reply-To: (Kim F. Storm's message of "Fri, 28 Apr 2006 00:53:42 +0200") 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:53546 Archived-At: 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 goes beyond my capabilites :-/ I put a breakpoint in x_new_font, and got this result: Breakpoint 6, x_new_font (f=0x86c1678, fontname=0x86af3a0 "-xos4-terminus-medium-r-normal--17-123-100-100-c-90-iso8859-1") at xterm.c:7848 (gdb) n (gdb) p *fontp $11 = { font = 0x86c1e28, font_idx = 0, name = 0x86c1d50 "-xos4-terminus-medium-r-normal--17-123-100-100-c-90-iso8859-1", full_name = 0x86c1de0 "-xos4-terminus-medium-r-normal--17-123-100-100-c-90-iso8859-1", charset = 0, size = 9, height = 16, space_width = 9, average_width = 9, vertical_centering = 0, encoding = "\000\377", '\0' , '\001' , baseline_offset = 0, relative_compose = 0, default_ascent = 0, font_encoder = 0x0 } So the frame's default font width is 9 pixels. But when I contine and get to the place where an "A" is inserted in the header line, I get this font info for the "A" character: (gdb) p *face $13 = { id = 17, gc = 0x0, font = 0x85ea4a0, stipple = 0, foreground = 3355443, background = 15066597, underline_color = 0, overline_color = 0, strike_through_color = 0, box_color = 3355443, font_name = 0x85ea408 "-xos4-Terminus-Medium-R-Normal--16-160-72-72-C-80-ISO8859-1", font_info_id = 1, fontset = 20, pixmap_w = 0, pixmap_h = 0, box_line_width = 2, box = FACE_RAISED_BOX, use_box_color_for_shadows_p = 0, lface = {137881521, 141778755, 137913561, 792, 137913561, 137913561, 137881137, 137881137, 138504219, 138504203, 137881137, 137881137, 137881137, 139595989, 141300995, 137881137, 720}, hash = 16929879, charset = 0, underline_p = 0, overline_p = 0, strike_through_p = 0, foreground_defaulted_p = 0, background_defaulted_p = 0, underline_defaulted_p = 0, overline_color_defaulted_p = 0, strike_through_color_defaulted_p = 0, box_color_defaulted_p = 1, tty_bold_p = 0, tty_dim_p = 0, tty_underline_p = 0, tty_alt_charset_p = 0, tty_reverse_p = 0, tty_blinking_p = 0, colors_copied_bitwise_p = 0, overstrike = 0, next = 0x0, prev = 0x87d33c0, ascii_face = 0x8596d68 } (gdb) n (gdb) (gdb) (gdb) n (gdb) (gdb) (gdb) (gdb) (gdb) p *font_info $14 = { font = 0x85ea4a0, font_idx = 1, name = 0x85ea1f8 "-xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-1", full_name = 0x85ea408 "-xos4-Terminus-Medium-R-Normal--16-160-72-72-C-80-ISO8859-1", charset = 0, size = 8, height = 16, space_width = 8, average_width = 8, vertical_centering = 0, encoding = "\000\377", '\0' , '\001' , baseline_offset = 0, relative_compose = 0, default_ascent = 0, font_encoder = 0x0 } (gdb) n (gdb) (gdb) (gdb) (gdb) (gdb) p *pcm $15 = { lbearing = 1, rbearing = 7, width = 8, ascent = 10, descent = 0, attributes = 0 } (gdb) So somewhere along the road, something has selected a different font (width 8) for the characters in the header line -- and in the text area of the window, but the align-to uses the default frame font of width 9 (that's what it has to do). How can this happen? To reproduce, get the above font installed, and put this in .Xdefaults: Emacs.font: -*-terminus-medium-r-*-*-17-*-*-*-*-*-iso8859-1 Then run emacs -Q ~/tmp/foo.ses Now hit M-o a few times to add some columns. and type 1 RET 2 RET 3 RET to insert some data in the sheet. -- Kim F. Storm http://www.cua.dk