From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Ligatures (was: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY)) Date: Fri, 22 May 2020 16:02:22 -0400 Message-ID: <639a2445-3773-2455-92f6-38b3c5b5f7b5@gmail.com> References: <20200517165953.000044d2@web.de> <83mu6481v3.fsf@gnu.org> <75a90563-51b4-d3b8-4832-fc0e2542af0d@gmail.com> <83blmi7hys.fsf@gnu.org> <837dx55qff.fsf@gnu.org> <834ks95cmz.fsf@gnu.org> <4faa291f-f2df-36d1-73d5-332b93a9b6d8@gmail.com> <83wo544hx5.fsf@gnu.org> <831rnc43ih.fsf@gnu.org> <83ftbs2jr5.fsf@gnu.org> <838shk2ga3.fsf@gnu.org> <835zcn3iao.fsf@gnu.org> <83wo5321qp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="20612"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: alan@idiocy.org, pipcet@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 22 22:03:01 2020 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 1jcDsi-0005Cr-Sv for ged-emacs-devel@m.gmane-mx.org; Fri, 22 May 2020 22:03:00 +0200 Original-Received: from localhost ([::1]:58400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcDsh-0007XE-V9 for ged-emacs-devel@m.gmane-mx.org; Fri, 22 May 2020 16:02:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcDsB-00078i-U7 for emacs-devel@gnu.org; Fri, 22 May 2020 16:02:27 -0400 Original-Received: from mail-qv1-xf41.google.com ([2607:f8b0:4864:20::f41]:43510) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcDsA-0007Af-PC; Fri, 22 May 2020 16:02:27 -0400 Original-Received: by mail-qv1-xf41.google.com with SMTP id p4so5293659qvr.10; Fri, 22 May 2020 13:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/edcVilV8AX6+JxBbl5Q1lTA61Plj3pSRcjBaxWHbHk=; b=JjlYUD1O7VyH0M1LBXVykv13UQitLal/YAzqW5mMgY0LxlAttLfaUtjN8J2kPIF3TX Z3CpLfU55+kUvFcnUSnU009kiwmlfXCFGEbAURzjI7+z4M6TO0o3+oMGIrn61qdyql82 Pxoyagrbhe/1wqdwZ8E4KeJDeITHj9AgLUXM0Qj0KzBIOj6B1xs1sg7e7/ujFXPwqwzW 8usL5e6AZbxHFrzXEisN4SlUYhpWgpUVwbZm49GnDWLLoTfPeKS7U1WYTnPq7TFHqisw vMXjeD7afaiLJ0aj24uVMuBfsA8ERnPrY/zTRkEUBvEe3a2/T/2p+ORMz/7sUuIbl2SI bGVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/edcVilV8AX6+JxBbl5Q1lTA61Plj3pSRcjBaxWHbHk=; b=CkX+ep6ucc5xlRygWEokfL9+CVfJ+n7UPJ2w8vMaSvFU52AK1Sxt9VFpz6sxiF1a2B CxPr+o6ohyyuoXb2cGCnEoEbpOXnUdBfxXDI5+RtPMwAUtgMMMiV3XeNKcOaViaP3Xod xNoqm8Ov/XlbdkYlaR/YNCe//xywnVsZIF5aW2bgMbhIkSE422oLAuRAwRqeAIKFaONd LdM/pFT+sJ/iN5iISxYlXOmimCGOUUvOYIGPpiaKdVpgluFVfbsr/i/9SQ0mQYhlTNRe 6/O9OkOZ0EZH3N0DWFTugFbwZNJM/i/wJ9/FO7QaGycp6JiZWyySAhB55iOYIcWJtFO1 T0dQ== X-Gm-Message-State: AOAM532DP+m1p7ipci3BRpaZMy5nyrULOBHoqLyA2MV5i+AWJ5fbYc3E CLnyrzsHxZAArAWR6vn6Lq1ip7LB X-Google-Smtp-Source: ABdhPJyv+5i71fKjfGocnW2rYkoBTAQr6pZ+y9Z0TOQyBC4vtjr1ovvFJB7oXUewbltxa2/JlI24iw== X-Received: by 2002:a0c:b25b:: with SMTP id k27mr5145105qve.155.1590177745038; Fri, 22 May 2020 13:02:25 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:bda5:ac5c:1de0:b677? ([2601:184:4180:66e7:bda5:ac5c:1de0:b677]) by smtp.googlemail.com with ESMTPSA id c3sm8382154qtp.24.2020.05.22.13.02.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 May 2020 13:02:23 -0700 (PDT) In-Reply-To: <83wo5321qp.fsf@gnu.org> Content-Language: en-GB Received-SPF: pass client-ip=2607:f8b0:4864:20::f41; envelope-from=cpitclaudel@gmail.com; helo=mail-qv1-xf41.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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:251247 Archived-At: On 22/05/2020 15.44, Eli Zaretskii wrote: >> Cc: pipcet@gmail.com, alan@idiocy.org, emacs-devel@gnu.org >> From: Clément Pit-Claudel >> Date: Fri, 22 May 2020 15:33:59 -0400 >> >>>> But then how do you handle symbol ligatures? >>> >>> By using suitable regular expressions. E.g., you could take the list >>> of ligatures in that FiraCode site and convert them into a regexp or a >>> set of regexps. >> >> Thanks. I don't understand why we need to do this > > I'm not sure I follow. Do you understand why > https://github.com/tonsky/FiraCode/wiki/Emacs-instructions includes a > long list of strings to be replaced with ligatures? Yes, I do understand: that's because Emacs' ligature support is currently weaker than other editors, and so you need to jump through hoops to use Fira Code. These hoops include telling Emacs what sequences to turn into ligatures. This problem is specific to Emacs: in other text editors, you just pick the font, and all supported ligatures are used. Importantly, the instructions on that page are a poor workaround that doesn't give you all the features of Fira Code (I don't mean that we couldn't support all of them, as I don't know if that true currently. I just mean that the page shouldn't be understood as providing full support for Fira Code in Emacs). That's why Emacs is in the fairly short list of "Doesn't work" editors, I think. > If so, why don't > you understand the reason we need to specify similar things when we > use automatic compositions? What I don't understand is what it is about Emacs that means that we need special lists of regexps for each new font, while other editors don't need them. > And who is "we" in this case? Users of these features indeed > shouldn't need to mess with these long lists of character sequences, > but why is it a problem if "we" the Emacs developers provide data > bases of such sequences in advance, which user-facing features could > use, hiding them behind much easier UI? We can't provide these data bases in advance, I think. Each font supports a different set of symbol ligatures, and so the list for each font will be different. >> it seems surprising that we'll need extra Emacs-specific work for each and every font that includes ligatures). > > I don't understand how you got to this conclusion. This is true for > prettify-symbols-mode, but that's exactly why I don't like that > implementation, and why I think automatic compositions are a better > way to go. And for automatic compositions we didn't yet decide that > any user-level action is needed when you switch to another font, we > are still discussing what is involved. Up front, I don't yet see why > such font-specific adjustment would be required from users. Each font offers a different set of symbol ligatures: there is no common superset that covers all fonts, except the ".+" regexp that Pip posted earlier. From earlier messages, I understood that we need to specify which character sequences to ligate. So, I conclude that we'll need new work every time a new font comes out, or the ligatures in a font change (every time Fira Code is updated, for example). Since other editors don't need that work, I wonder why it's needed in Emacs. Sorry if I misunderstood something; I don't want to waste anyone's time. Clément.