[Top][All Lists]

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

Re: Emacs 28: Specific TTF font gets loaded with font-backend x instead

From: Eli Zaretskii
Subject: Re: Emacs 28: Specific TTF font gets loaded with font-backend x instead of ftcrhb
Date: Thu, 06 Feb 2020 20:15:18 +0200

> From: Tassilo Horn <>
> Cc:
> Date: Thu, 06 Feb 2020 08:12:06 +0100
> After evaling that, -> becomes an arrow and ~> becomes an arrow with
> curvy stroke.  So either there's some issue with PragmataPro or my
> computer at home.

Well, it would be interesting to hear what happens with that other
machine and/or the font.  Be sure to try that in an Emacs built with
the HarfBuzz library, as it should have the most advanced ligature
support there is.

> Do I understand it correctly that "overshooting" with the above rules
> has no bad effect, i.e., if there is a composition rule for -> but the
> font has no ligature glyph for that, then it just stays the way it is?

Not exactly.  In Emacs built with HarfBuzz, you will see the original
ASCII characters displayed, but handled as a single grapheme cluster,
i.e. the cursor will be "widened" to include all of them, and a single
C-f will move across all of them.  However, I believe this is what
users should expect when the font doesn't include some of the
ligatures, no?

> So there could be some ligature-minor-mode which just adds all possible
> composition rules?  (Just speaking naively, I guess there are several
> distinct categories of ligatures which you would want to enable/disable
> on a per-mode basis.)

The part in parentheses is exactly the non-trivial part: we should
figure out which ligatures should be in effect in what major modes,
and probably also as function of some user preferences (such as the
language used in the buffer).  IOW, we need to design the UI for
specifying what classes of ligatures to activate.

Burt if you only care about ligatures in programming languages, the
job becomes much simpler, I think.  Although I'd still expect the
ligatures in effect to depend on the programming language of the
current buffer.  Which means composition-function-table needs to be
buffer-local, and we should make sure making it buffer-local does TRT.

reply via email to

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