[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ligature support
From: |
Lars Ingebrigtsen |
Subject: |
Re: Ligature support |
Date: |
Fri, 05 Nov 2021 16:20:19 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> 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?
Different fonts have different ligatures (or "ligatures"). Since we
don't want to send all strings through font-shape-gstring (because
that'll be slow), we'll have to be selective as usual, I think?
For instance, my test font has these ligatures:
<LigatureSet glyph="numbersign">
<Ligature components="zero,one" glyph="end1.swsh"/>
<Ligature components="zero,two" glyph="end2.swsh"/>
<Ligature components="zero,three" glyph="end3.swsh"/>
</LigatureSet>
I.e. "#01" is translated into a very different glyph, and we need to
know that so that we can send "#01" to harfbuzz to get the glyph out.
(This is how all the "neat" programming fonts that translate => into fun
glyphs work.)
This data is in the GPOS table, and I just found this fun utility:
ttx -t GPOS ~/.fonts/Jolie\ Romantique.ttf
I'll have a peek at the source code to see how much work it is to
extract this data.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Re: Entering emojis, (continued)
- 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, 2021/11/05
- Re: Ligature support,
Lars Ingebrigtsen <=
- 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
- Re: Ligature support, Lars Ingebrigtsen, 2021/11/05