[Top][All Lists]

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

Re: Entering emojis

From: Gregory Heytings
Subject: Re: Entering emojis
Date: Thu, 28 Oct 2021 21:10:41 +0000

Yes, I know. But ligatures are not the only way of handling this. When a font produces a ligature, i.e. a precomposed glyph that should be displayed instead of several characters, it produces a single font glyph. The other way is to produce several font glyphs, each one with offsets relative to the base-line. Emacs supports both ways. However, for any of the two to work, both the shaping engine and the font should recognize the sequence, and the font should produce one or more glyphs with the offsets for that sequence.

In this case, ISTM that the problem is not the font, but the shaping engine. If Harfbuzz does not know how handle the joiners and segment delimiters, it should behave as they did not exist, and use the font ligatures (if the font does have ligatures), instead of displaying the fictitious glyph at that codepoint (at the codepoint of the joiner or delimiter). If it knows how to handle joiners and delimiters, it should ignore the font ligatures and create the final glyph with the individual glyphs in the font. IIUC, that way a single font can be used with and without ligatures and with and without joiners and segment delimiters.

I mean what the Unicode Standard says: it says that two hieroglyphs should be displayed "normally", i.e. as separate characters at the same vertical position, unless there's the vertical joiner between them, in which case one should be above the other.

I understand. But what the standard says doesn't make sense I think, because it means that it requires one to ignore font ligatures and instead requires one to use joiners and segment delimiters. Again I know next to nothing about hieroglyphs (although I did learn a few things about them today), but I'd guess that if the Aegyptus font uses ligatures, it's because the number of combinations between hieroglyphs to produce a quadrat is, in practice, limited. Just like in ancient greek you cannot put a rough breathing above an arbitrary letter for example.

Which then means that you cannot write anything where these 4 characters are displayed in an arrangement different from that particular one that's encoded in the font, unless you use non-joiners.

That's not entirely correct. Aegyptus provides an alternative arrangement for most quadrats, sometimes it even provides two alternative arrangements. But indeed you have to use non-joiners if you want to ignore the automatic arrangement provided by the font. Which is I guess much easier to use in practice than joiners and segment delimiters. It would be a pain to type, in a language with diacritics, the letter itself, a joiner to indicate where the diacritic should be placed, and the diacritic itself, if in the vast majority of cases the diacritic is always placed in the same way.

However, the composition rules I defined went with Unicode, and need to be fixed to support what the Aegyptus font does. Does the patch below help?

It does!  Thanks.

Here's a combined patch, with the comment you asked.

Attachment: Make-hieroglyphs-display-correctly-in-Emacs-for-the-.patch
Description: Text Data

reply via email to

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