emacs-devel
[Top][All Lists]
Advanced

[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 10:10:31 +0200

> Date: Thu, 02 Dec 2021 22:18:51 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: tumashu@163.com, larsi@gnus.org, emacs-devel@gnu.org
> 
> > Emacs adds spaces after the character under point, but the space obstructs 
> > the character after. If I hold on C-f and go over every character, their 
> > alignment are fixed:
> 
> Yes, I see it as well.  Strange.  I guess I'm missing something here.
> Hmm...

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.



reply via email to

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