[Top][All Lists]

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

Re: Variable pitch text filling

From: Eli Zaretskii
Subject: Re: Variable pitch text filling
Date: Fri, 03 Dec 2021 13:31:26 +0200

> From: "Feng Shu" <tumashu@163.com>
> Cc: casouri@gmail.com,  larsi@gnus.org,  emacs-devel@gnu.org
> Date: Fri, 03 Dec 2021 16:17:56 +0800
> > I'm very sorry.  This cannot work.  The problem is that we can easily
> > change the pixel-width of the character glyphs Emacs uses for its
> > layout calculations (which is what the change did), but when we
> > actually draw the glyphs on the glass, we ask the font backend to draw
> > a series of glyphs in one go, and the font backend uses the original
> > glyph metrics as reported by the font.  So, unless we draw each glyph
> > separately (which is what moving the cursor through text causes us to
> > do), something that will slow down redisplay, we cannot add spacing to
> > characters that way.
> >
> > This is one of the "TIL" situations each one of us has with Emacs from
> > time to time.  It means my thinking about adding character spacing was
> > based on wrong assumptions, and the only way to do that is to add
> > stretch glyphs (which can be done only between words).
> >
> > I reverted the changeset installed yesterday.
> this is really a bad news :-(

What I can propose instead, as a kind-of "second best", is a similar
feature that will only affect whitespace characters (SPC and TAB):
when the proposed feature is turned on, those whitespace characters
will always end at X coordinate that is an integral multiple of the
"standard" column width.  This way, a word within a text that mixes
ASCII and non-ASCII characters will always start on an integral column
boundary, as defined by the ASCII font of the face.

Would this be useful enough to implement?

reply via email to

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