emacs-devel
[Top][All Lists]
Advanced

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

Re: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY)


From: Eli Zaretskii
Subject: Re: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY)
Date: Sun, 17 May 2020 22:17:17 +0300

> From: Pip Cet <address@hidden>
> Date: Sun, 17 May 2020 18:50:19 +0000
> Cc: address@hidden, address@hidden
> 
> HarfBuzz also tells you which codepoints are used for which glyphs. It
> should also, for languages where it can do so, tell you which
> codepoints are used for which subglyphs. It fails to do the latter.

No, it doesn't fail.  You can see what it tells us in the display of
the composition produced by "C-u C-x =".

> That one is simply unworkable for English and its limited traditional
> set of ligatures.

The main reason we want ligatures in Emacs is for displaying program
source.  Latin ligatures are not the main reason.  But I see no reason
we couldn't do what you want, it's just the question of someone who'd
need to write the code.  The information is there.

> LibreOffice highlights sub-glyphs of ligatures correctly. I enter
> "official", and it renders <o> <ffi> <c> <i> <a> <l>. I move the
> cursor right twice, and it highlights precisely what it should, the
> middle "f" of the ligature glyph.

We can do that in Emacs as well.  The information is there, we just
need to use it.  For Latin ligatures that information will allow the
display you describe.  Doing that for other scripts would be harder,
and the results will be less one-to-one.

> > The truth is that "we" the Emacs project don't want to know anything
> > about ligatures, we want to delegate that job to the shaper.
> 
> I don't see how that's true. Treating a ligature as a single character
> for entry purposes is simply unworkable for English.

I didn't say we must treat ligatures as a single character, I just
said we do that now.  But that has nothing to do with the fact that we
want all the information about the ligature to come from the shaper.

> out of the box, Emacs fails miserably to do anything about English
> ligatures. Trying to find a way to fix it, I ran into HarfBuzz
> limitations that appear to make it impossible to use it to deal with
> English ligatures. It might deal very well with other languages and
> their ligatures, but for English text, it fails to do what TeX did
> since its inception.

I don't think this is right, but since you haven't shown any code, or
what you tried to do, or which HarfBuzz limitations you allude to, it
is hard to be more specific.  I can only suggest, again, to look at
the output of "C-u C-x =" -- that information comes directly from
HarfBuzz.



reply via email to

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