emacs-devel
[Top][All Lists]
Advanced

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

Re: Ligatures (was: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywh


From: Eli Zaretskii
Subject: Re: Ligatures (was: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY))
Date: Sun, 24 May 2020 18:19:18 +0300

> From: Pip Cet <address@hidden>
> Date: Sat, 23 May 2020 21:29:32 +0000
> Cc: address@hidden, address@hidden, address@hidden
> 
> > If we are going
> > to send large chunks of text to the shaping engine, then none of the
> > insane complexity of bidi.c makes sense; we should simply throw all of
> > it away and use a very different, batch-style reordering code, of the
> > kind you can find in the freebidi library.  The sole reason for
> > bidi.c's existence is to produce character positions in the _visual_
> > order, one position at a time, something that no other bidi-aware
> > editor does.
> 
> Yes, except we're not talking about "large chunks of text" here:
> somehow you went from "we need only a bunch of regexps to catch
> ligatures" to "we need to send entire paragraphs to the shaping
> engine, nothing less will do".

The former is what we do now.  If you want to treat fonts as software,
then the HarfBuzz guys tell us we need to pass all the text through
the shaper.

> My opinion is that we need a reasonable amount of context, often
> just a single character, and I see no reason to throw out the entire
> display engine because we want some look-ahead.

The problem is to determine how much of surrounding text is needed.
The answer I was given was "all of it".  So if we want to do it right,
that is what we should do.  What you propose stops short of that goal,
so it's yet another partial solution.  Doing that to avoid the need of
specifying a fixed set of ligatures in advance sounds like a lot of
pain for minimal gain to me.

> Remember that this discussion started when I mentioned that I was
> unhappy with HarfBuzz, and I still am, precisely because of its
> "first, send me your entire document" approach.

I'm familiar with 3 shaping engines, and they all behave like that.
So this is not an idiosyncrasy of HarfBuzz, it's how text-shaping
works in general.



reply via email to

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