From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: Entering emojis Date: Thu, 28 Oct 2021 21:10:41 +0000 Message-ID: <8ff3b131c550df7ca195@heytings.org> References: <87cznths5j.fsf@gnus.org> <87tuh4f1ie.fsf@gnus.org> <0353A9DA-0041-4D71-8E1B-09FB07A5FD0F@acm.org> <87ilxialzw.fsf@igel.home> <831r46wj6r.fsf@gnu.org> <83fssmuxui.fsf@gnu.org> <83bl3aux6y.fsf@gnu.org> <835ytiuvm9.fsf@gnu.org> <834k91vgie.fsf@gnu.org> <8ff3b131c5fa370d9eaf@heytings.org> <83mtmttsxz.fsf@gnu.org> <8ff3b131c56b7b2d1d6f@heytings.org> <83bl39tqnl.fsf@gnu.org> <8ff3b131c531f5254799@heytings.org> <83a6ittp5r.fsf@gnu.org> <8ff3b131c53b9df49236@heytings.org> <834k91th5c.fsf@gnu.org> <8ff3b131c5fe09753ca0@heytings.org> <83mtmtru6l.fsf@gnu.org> <8ff3b131c57f741d04e5@heytings.org> <83lf2drqx6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="wZr8ySSWCT" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17424"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattiase@acm.org, raman@google.com, schwab@linux-m68k.org, stefankangas@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 28 23:36:14 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mgD4H-0004GA-Ox for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Oct 2021 23:36:13 +0200 Original-Received: from localhost ([::1]:39016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgD4G-0002El-JW for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Oct 2021 17:36:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgCfh-0000yC-2f for emacs-devel@gnu.org; Thu, 28 Oct 2021 17:10:50 -0400 Original-Received: from heytings.org ([95.142.160.155]:43606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgCfe-0006f4-ON; Thu, 28 Oct 2021 17:10:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1635455442; bh=q0YC4ZP2yffCoqMf9/ho3U6Dll+GIjTco2euh8j7sw0=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=qPLNtJfewd5GfqZd2VqqcMH+2OYrwsxqy1BfZCSLiCefrxBhptotDhul1F7mDgqIk mNZQrgPZI/nUC9D3Y/QGdIX3WYgnBR5NY3YwGaUfjc+jIkM4JVylkG0lFWHSSqqcHU JF6tbZDabMp+xVnGyQL0/yw/I/EaCbKrGXY9JlprmTAp/i7Wd6YHmtIUtJI3GEZrC8 JNUL7Q1Tdjg1BAI/DoHWG4kvLxPegHhHS6cDU8sWeQEPFlnR+aEUjhRMvMpuNpgFCO CjD5LVrLsOsGyj0DsZCl2H4zMr6n+ZLMp5oWkQ+36ffDk0g+MU5Txvlwk9KsRE+mqu 7r3uBG4cdEZkQ== In-Reply-To: <83lf2drqx6.fsf@gnu.org> Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278142 Archived-At: --wZr8ySSWCT Content-Type: text/plain; format=flowed; charset=us-ascii > > 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. --wZr8ySSWCT Content-Type: text/x-diff; name=Make-hieroglyphs-display-correctly-in-Emacs-for-the-.patch Content-Transfer-Encoding: base64 Content-ID: <8ff3b131c5773aed722e@heytings.org> Content-Description: Content-Disposition: attachment; filename=Make-hieroglyphs-display-correctly-in-Emacs-for-the-.patch RnJvbSBjMTZkZDFiYjJiNDVlYjRjNDFkNmVmYzBjYTgyNWUzZTZkYTRmYjc4 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBUaHUsIDI4IE9j dCAyMDIxIDIwOjU4OjAyICswMDAwDQpTdWJqZWN0OiBbUEFUQ0hdIE1ha2Ug aGllcm9nbHlwaHMgZGlzcGxheSBjb3JyZWN0bHkgaW4gRW1hY3MgZm9yIHRo ZSBtb21lbnQuDQoNCiogZXRjL0hFTExPOiBSZW1vdmUgaGllcm9nbHlwaCBm b3JtYXQgY29udHJvbHMuDQoNCiogbGlzcC9sYW5ndWFnZS9taXNjLWxhbmcu ZWw6IFVzZSBmb250LXNoYXBlLWdzdHJpbmcgaW5zdGVhZCBvZg0KZWd5cHRp YW4tc2hhcGUtZ3JvdXBpbmcgdW50aWwgaGllcm9nbHlwaCBmb3JtYXQgY29u dHJvbHMgYXJlIHN1cHBvcnRlZA0KYnkgZm9udHMgYW5kIHNoYXBpbmcgZW5n a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