all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: Jonathan Yavner <jyavner@member.fsf.org>,
	rms@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Default face problem [was: Re: incomplete header-line with 3d boxes and prop fonts]
Date: Fri, 28 Apr 2006 13:34:08 +0200	[thread overview]
Message-ID: <m3aca6lyrz.fsf_-_@kfs-l.imdomain.dk> (raw)
In-Reply-To: <m3ejzisk95.fsf@kfs-l.imdomain.dk> (Kim F. Storm's message of "Fri, 28 Apr 2006 00:53:42 +0200")

storm@cua.dk (Kim F. Storm) writes:

> Sascha Wilde <wilde@sha-bang.de> 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' <repeats 126 times>, '\001' <repeats 127 times>, 
  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' <repeats 126 times>, '\001' <repeats 127 times>, 
  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 <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2006-04-28 11:34 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-20 22:35 incomplete header-line with 3d boxes and prop fonts Stefan Monnier
2006-04-24  0:25 ` Kim F. Storm
2006-04-24  6:58   ` Stefan Monnier
2006-04-24 11:51   ` Richard Stallman
2006-04-24 12:11     ` Kim F. Storm
2006-04-25  3:16       ` Jonathan Yavner
2006-04-25 22:04         ` Richard Stallman
2006-04-25 12:38       ` Sascha Wilde
2006-04-25 14:47         ` Kim F. Storm
2006-04-25 15:11           ` Sascha Wilde
2006-04-27 22:53             ` Kim F. Storm
2006-04-28 11:34               ` Kim F. Storm [this message]
2006-05-01  2:41                 ` Default face problem [was: Re: incomplete header-line with 3d boxes and prop fonts] Kenichi Handa
2006-05-01  3:14                   ` Default face problem Stefan Monnier
2006-05-01  4:32                     ` Kenichi Handa
2006-05-01 12:34                       ` Stefan Monnier
2006-05-01 12:51                         ` Kenichi Handa
2006-05-01 13:58                           ` Stefan Monnier
2006-05-02  0:42                             ` Kenichi Handa
2006-05-01  8:25                   ` Kim F. Storm
2006-05-01 12:35                     ` Stefan Monnier
2006-05-01 12:49                       ` Kim F. Storm
2006-05-08  5:51                     ` Kenichi Handa
2006-05-08  8:47                       ` Kim F. Storm
2006-05-08 11:50                         ` Kenichi Handa
2006-05-08 12:19                           ` Kim F. Storm
2006-05-10  4:17                             ` Kenichi Handa
2006-05-10 12:21                               ` Kim F. Storm
2006-05-10 12:41                                 ` Kenichi Handa
2006-05-10 17:45                                   ` Eli Zaretskii
2006-05-11  0:36                                     ` Kenichi Handa
2006-05-11  3:40                                       ` Eli Zaretskii
2006-05-11  4:35                                         ` Kenichi Handa
2006-05-13 13:04                                           ` Eli Zaretskii
2006-05-15  1:41                                             ` Kenichi Handa
2006-05-15  3:33                                               ` Eli Zaretskii
2006-05-15  4:47                                                 ` Kenichi Handa
2006-05-10 17:45                               ` Eli Zaretskii
2006-04-24 13:02     ` incomplete header-line with 3d boxes and prop fonts Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3aca6lyrz.fsf_-_@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=jyavner@member.fsf.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.