GNU bug report logs -
#1254
23.0.60; linum-mode display problem with variable-pitch font
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1254 in the body.
You can then email your comments to 1254 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1254
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stephen Berman <stephen.berman <at> gmx.net>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[linum.png (image/png, attachment)]
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1254
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at 1254 <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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?
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1254
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Markus Triska <markus.triska <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #15 received at 1254 <at> emacsbugs.donarmstrong.com (full text, mbox):
Chong Yidong <cyd <at> stupidchicken.com> writes:
> I suggest a workaround: make the `linum' face inherit the face
> "fixed-pitch". Markus, WDYT?
I cannot reproduce the problem with X11 on OSX and thus cannot test
this. Would it work to interpret the margin width in terms of the
broadest glyph in a font, so other packages would benefit too?
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1254
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #20 received at 1254 <at> emacsbugs.donarmstrong.com (full text, mbox):
> I cannot reproduce the problem with X11 on OSX and thus cannot test
> this. Would it work to interpret the margin width in terms of the
> broadest glyph in a font, so other packages would benefit too?
Not only that's not really possible with the current code's limitations,
but it would also be a bad idea: in most fonts the widest glyph is
pretty hideously wide, so you'd end up with margins that are much
too wide.
Stefan
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1254
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Markus Triska <markus.triska <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #25 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> in most fonts the widest glyph is pretty hideously wide, so you'd end
> up with margins that are much too wide.
I see; if all text displayed in the margins need to use fixed-width
fonts currently to guarantee that all glyphs are still visible, it seems
it can be done by the engine instead of changing all affected packages.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1254
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #30 received at 1254 <at> emacsbugs.donarmstrong.com (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> I cannot reproduce the problem with X11 on OSX and thus cannot test
>> this. Would it work to interpret the margin width in terms of the
>> broadest glyph in a font, so other packages would benefit too?
>
> Not only that's not really possible with the current code's limitations,
> but it would also be a bad idea: in most fonts the widest glyph is
> pretty hideously wide, so you'd end up with margins that are much
> too wide.
I looked at this some more. Apparently, the workaround of making the
linum face fixed pitch doesn't work, because the margin width always
uses the default glyph width. Apparently, the default glyph width is
too narrow when using some variable-pitch fonts (in my case, DejaVu
Sans).
I don't know any completely satisfactory way to resolve this. One
possible workaround is for linume.el to provide an option to add an
extra column to the margin width.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1254
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Markus Triska <markus.triska <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #35 received at 1254 <at> emacsbugs.donarmstrong.com (full text, mbox):
Chong Yidong <cyd <at> stupidchicken.com> writes:
> I don't know any completely satisfactory way to resolve this. One
> possible workaround is for linume.el to provide an option to add an
> extra column to the margin width.
I think that's not necessary: You can get almost the same effect with:
(setq linum-format "%d ")
Tags added: wontfix
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Tue, 28 Oct 2008 17:50:03 GMT)
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1254
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #42 received at 1254 <at> emacsbugs.donarmstrong.com (full text, mbox):
> I don't know any completely satisfactory way to resolve this. One
> possible workaround is for linume.el to provide an option to add an
> extra column to the margin width.
Maybe the margin size could be set to `auto' in which case the size is
dynamically auto-adjusted during redisplay so that the text displayed in
the margin fits. It sounds difficult, tho.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1254
; Package
emacs
.
(Wed, 18 Feb 2009 12:00:04 GMT)
Full text and
rfc822 format available.
Message #45 received at control <at> debbugs.gnu.org (full text, mbox):
close 1254
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 27 Jan 2016 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 142 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.