help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Using proportional (variable-width) fonts in Emacs23


From: PJ Weisberg
Subject: Re: Using proportional (variable-width) fonts in Emacs23
Date: Wed, 30 Mar 2011 12:49:48 -0700

On 3/30/11, Eli Zaretskii <address@hidden> wrote:
>> From: "Pascal J. Bourguignon" <address@hidden>
>> Date: Wed, 30 Mar 2011 17:53:02 +0200
>>
>> rusi <address@hidden> writes:
>>
>> >> Unfortunately, Editors with proportional fonts don't
>> >> have indenting and formating algorithms sophisticated enough to render
>> >> code like in the later example (that would require even more than
>> >> understanding the program!).
>> >
>> > Well that is (may be?) the current situation. Why cant it change?
>>
>> Because you would need strong AI to do it right
>
> Not necessarily.  In Emacs, we can specify that text be displayed
> aligned to a specific width in pixels.  See the node "Specified Space"
> in the ELisp manual.  Perhaps display of programming languages could
> use this feature to align program source even with proportional fonts.

Something like the rule "after a string of two or more whitespace
characters, position the next character as if the preceeding text on
that line was monospaced"?  It would do a decent job of guessing when
the programmer is trying to align things and put the text in a
standard place.  It would take some tuning to avoid making the gaps
excessively large, though.  (And I'm sure it would annoy plenty of
people who *expect* all code to be monospaced.)

-PJ



reply via email to

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