[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ligature support
From: |
Eli Zaretskii |
Subject: |
Re: Ligature support |
Date: |
Fri, 05 Nov 2021 17:14:31 +0200 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: gregory@heytings.org, mattiase@acm.org, emacs-devel@gnu.org,
> schwab@linux-m68k.org, stefankangas@gmail.com, raman@google.com
> Date: Fri, 05 Nov 2021 15:38:12 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > So for having ligatures you need to set up composition-function-table
> > for the characters that could/should ligate.
>
> Yes. And to do that, we can parse the tables in the font, apparently.
> It's not obviously clear how, but it looks like harfbuzz has the
> functions needed.
Why do we need to depend on the font? As I said, if the font doesn't
have a ligature, font-shape-gstring will return nil, and we will then
display the characters as individual glyphs. Isn't that what is
expected?
> > But please read the TODO item: there are pitfalls here that we need to
> > solve before this could be considered a reasonable user-level
> > feature. Setting up composition-function-table to produce ligatures
> > for, say, "fi" and "ff" is easy for testing, but if you do that in
> > production, every word with these characters, everywhere on display in
> > Emacs, will display as that ligature, and that is hardly TRT. We need
> > to make this more fine-tunable. TODO has the details.
>
> I guess it needs some more customisation to be a per-font thing?
I'm not sure it's per font. I think it should be per buffer/mode, and
perhaps also something special for the mode line.
> But first we need to parse the Gsub/Gpos tables so that we can get
> started at all.
I don't think we should or need to do that. See above.
- Re: Entering emojis, (continued)
- Re: Entering emojis, Jonas Bernoulli, 2021/11/02
- Re: Entering emojis, Jonas Bernoulli, 2021/11/02
- Re: Entering emojis, Andreas Schwab, 2021/11/03
- Re: Entering emojis, Lars Ingebrigtsen, 2021/11/05
- Re: Ligature support (was: Entering emojis), Eli Zaretskii, 2021/11/05
- Re: Ligature support, Lars Ingebrigtsen, 2021/11/05
- Re: Ligature support, Eli Zaretskii, 2021/11/05
- Re: Ligature support, Lars Ingebrigtsen, 2021/11/05
- Re: Ligature support,
Eli Zaretskii <=
- Re: Ligature support, Lars Ingebrigtsen, 2021/11/05
- Re: Ligature support, Eli Zaretskii, 2021/11/05
- Re: Ligature support, Lars Ingebrigtsen, 2021/11/05
- Re: Ligature support, Lars Ingebrigtsen, 2021/11/05
- Re: Ligature support, Eli Zaretskii, 2021/11/05
- Re: Ligature support, Eli Zaretskii, 2021/11/05
- Re: Ligature support, Lars Ingebrigtsen, 2021/11/05
- Re: Ligature support, Yuri Khan, 2021/11/05
- Re: Ligature support, Lars Ingebrigtsen, 2021/11/05
- Re: Ligature support, Eli Zaretskii, 2021/11/05