unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1254: 23.0.60; linum-mode display problem with variable-pitch font
@ 2008-10-27 21:58 Chong Yidong
  2008-10-28 12:30 ` Markus Triska
  0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2008-10-27 21:58 UTC (permalink / raw
  To: Stephen Berman; +Cc: 1254, Markus Triska

> 1. emacs -Q
> 2. C-SPC M-< M-w C-y C-y C-y (copy the *scratch* text so the buffer has
> more than ten lines)
> 3. M-x variable-pitch-mode
> 4. M-x linum-mode
>
> The rightmost digits in the double digit line numbers are partly cut off

Currently, Emacs assumes that the pixel width of the left margin is
simply the width of the left margin, in character glyphs, times the
default width of a glyph in pixels.  This assumption obviously runs into
problems if you display a variable-width font in the left margin.

Fixing this in redisplay is not easy, and at this stage of the release
process I'd prefer not to touch that part of the code.  (For instance,
we can't just let the left margin have an arbitrary pixel width, because
window resizing assumes otherwise.)

I suggest a workaround: make the `linum' face inherit the face
"fixed-pitch".  Markus, WDYT?






^ permalink raw reply	[flat|nested] 8+ messages in thread
* bug#1254: 23.0.60; linum-mode display problem with variable-pitch font
@ 2008-10-25 19:33 Stephen Berman
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Berman @ 2008-10-25 19:33 UTC (permalink / raw
  To: emacs-pretest-bug

[-- Attachment #1: Type: text/plain, Size: 696 bytes --]

1. emacs -Q
2. C-SPC M-< M-w C-y C-y C-y (copy the *scratch* text so the buffer has
more than ten lines)
3. M-x variable-pitch-mode
4. M-x linum-mode

=> The rightmost digits in the double digit line numbers are partly cut
off and the single digit line numbers do not align with the rightmost
digit of the double digit numbers (as they do with monospaced fonts),
but are aligned between the two digits, see the attached image.

When I start Emacs with -Q and invoke variable-pitch-mode, the font used
is this: 
xft:-monotype-Albany AMT-normal-normal-normal-*-16-*-*-*-*-0-iso10646-1 (#x45)

In GNU Emacs 23.0.60.12 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of
2008-10-25 on escher.

Steve Berman


[-- Attachment #2: variable-pitch line numbers --]
[-- Type: image/png, Size: 2219 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-10-28 19:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-27 21:58 bug#1254: 23.0.60; linum-mode display problem with variable-pitch font Chong Yidong
2008-10-28 12:30 ` Markus Triska
2008-10-28 14:38   ` Stefan Monnier
2008-10-28 17:29     ` Chong Yidong
2008-10-28 17:35       ` Markus Triska
2008-10-28 19:19       ` Stefan Monnier
     [not found]   ` <mailman.2269.1225205413.25473.bug-gnu-emacs@gnu.org>
2008-10-28 15:45     ` Markus Triska
  -- strict thread matches above, loose matches on Subject: below --
2008-10-25 19:33 Stephen Berman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).