[Top][All Lists]

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

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

From: Eli Zaretskii
Subject: Re: Using proportional (variable-width) fonts in Emacs23
Date: Mon, 28 Mar 2011 20:29:36 +0200

> Date: Mon, 28 Mar 2011 09:22:51 -0700 (PDT)
> From: Erin Brinkley <address@hidden>
> But I discovered a huge problem: the fill and word wrap commands are hard 
> coded to work for monospaced fonts only! For instance the fill-column is 
> based on monospace fonts: if you use a proportional font and set the fill 
> column to what you think is a reasonable number, you'll soon find out that 
> you are WRONG and you get extra whitespace at the end of a line, and words 
> will wrap! The only way out is to set the fill-column to an insanely low 
> number, and that's not a real solution either!

What do you mean by "word wrap" commands?

The only word wrap described in the Emacs manual is invoked by 
"M-x visual-line-mode RET", and that one is _not_ hard coded for
monospaced fonts.  Please try it.

The reason filling counts all characters of the same fonts as if they
had the same size is that filling inserts hard newlines, so the result
should work independent of the font.  Filling works on the buffer text
level, where character size on screen are not known.  By contrast, you
are looking for _display_time_ wrap, so filling is not what you want.
"Word wrap" as implemented as part of Visual Line Mode is designed to
exactly that, and it works on the level where the true size of each
character on display is known.

reply via email to

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