emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unfortunate pixel width of one TAB


From: Markus Gritsch
Subject: Re: Unfortunate pixel width of one TAB
Date: Mon, 27 Dec 2004 10:37:55 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707

Richard Stallman wrote:
When using a proportional font the pixel width of one TAB is "tab-width times average_char_pixel_width". When editing files which contain tabs and spaces for indenting, this leads to some bad alignment.

If would be nice if the pixel width of one TAB could be set to something like "tab-width times space_pixel_width".

Do you mean, the width of a space in the current font?
That seems like the right behavior for it.

Yes, exactly. The pixel width of a space of the currently used font should be taken into account. As a workaround, I am currently lying to Emacs about the font I use. Normally I would specify
  "-*-Bitstream Vera Sans-normal-r-*-*-12-*-*-*-*-*-iso8859-*"
but to get the pixel width of a tab right I have to use
  "-*-Bitstream Vera Sans-normal-r-*-*-12-*-*-*-*-40-iso8859-*".

Without explicitly specifying a pixel with of 40 for this font, Emacs chooses the following font which has a pixel spacing of 60 (spaces in the font name replaced by underscores to prevent line wrapping in the email)
-outline-Bitstream_Vera_Sans-normal-r-normal-normal-12-90-96-96-p-60-iso8859-*

This fixes the indentation problem, but since lying is never a good idea it leads to several problems in other cases.

Kind regards,
Markus

P.S.: I found a quite old email where the same problem was discussed for XEmacs: http://list-archive.xemacs.org/xemacs/199805/msg00176.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]