emacs-devel
[Top][All Lists]
Advanced

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

Re: Ligatures


From: Eli Zaretskii
Subject: Re: Ligatures
Date: Mon, 18 May 2020 22:33:53 +0300

> From: Pip Cet <address@hidden>
> Date: Mon, 18 May 2020 19:19:19 +0000
> Cc: Stefan Monnier <address@hidden>, address@hidden
> 
> > An alternative which might be nicer is to "split" the composition:
> > display it as if a ZWNJ character was inserted at point.  Thus, moving
> > forward one buffer position into the ffi would show f followed by a thin bar
> > cursor followed by the fi; moving forward one more buffer position
> > would show ff followed by a thin bar cursor followed by i.  Etc.
> 
> I tried something like that (with a variable-pitch font), and the
> effect is nauseating because the rest of the line shifts as the width
> of the word at point changes.

The idea is that this is used only rarely.  Most use cases don't need
to deconstruct a ligature that way; after all, that's what ligatures
are for.

> And this is where it gets back to "let's not hardcode the dependency
> on Harfbuzz and FreeType, because other backends might actually give
> us the information we need".

You cannot avoid hardcoding something, because each shaper has its
idiosyncrasies.  But those are only limited to the implementation of
the font driver interfaces described in font.h, they don't leak above
that level.  So if we will support such sub-glyph movements, we will
probably introduce one more method into the font driver interface, and
the display engine will use that.



reply via email to

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