emacs-devel
[Top][All Lists]
Advanced

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

Re: Variable pitch text filling


From: Feng Shu
Subject: Re: Variable pitch text filling
Date: Fri, 03 Dec 2021 19:55:51 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> 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?

If it is not hard implement, I suggest provide this patch, so we can try
it and provide feekback.



-- 




reply via email to

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