From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Ligature support Date: Sat, 06 Nov 2021 10:40:11 +0200 Message-ID: <83r1btbrtg.fsf@gnu.org> References: <87cznths5j.fsf@gnus.org> <83mtmtru6l.fsf@gnu.org> <8ff3b131c57f741d04e5@heytings.org> <83lf2drqx6.fsf@gnu.org> <87lf2c3k0z.fsf@gnus.org> <83wnlwqocq.fsf@gnu.org> <87wnlwyox9.fsf@gnus.org> <83lf2cq7n5.fsf@gnu.org> <87wnlnkxbo.fsf@gnus.org> <83cznfdohr.fsf@gnu.org> <87zgqik9bk.fsf@gnus.org> <83v916d64z.fsf@gnu.org> <878ry2k6qz.fsf@gnus.org> <83tugqd488.fsf@gnu.org> <87zgqiiq8c.fsf@gnus.org> <83r1bud3or.fsf@gnu.org> <87r1buipf5.fsf@gnus.org> <83o86yd0ig.fsf@gnu.org> <87a6iiimay.fsf@gnus.org> <83fssact8i.fsf@gnu.org> <87k0hmgre3.fsf@gnus.org> <87pmrdamcw.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12383"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 06 09:41:37 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 1mjHGb-000364-B6 for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Nov 2021 09:41:37 +0100 Original-Received: from localhost ([::1]:33774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjHGa-00056s-4R for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Nov 2021 04:41:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjHFS-0004Ks-FX for emacs-devel@gnu.org; Sat, 06 Nov 2021 04:40:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjHFS-0005eC-4B; Sat, 06 Nov 2021 04:40:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=hUKmRFMuiCR6HJkR3CoVJXqMNJbmVge7a43hqDi1Z/o=; b=VY3z9zeAk0gr BAnqHnUA6JkqZriNo0BbszD0Fktifvr7DCh1zyYgX5TLf+IANZjMPet3jZKE/lZ5GL+TwEf/CR7dj F+JnVJIJUqGjtcyQsCMeCg8k4Frc7FSeZzI79eNXJaz8Lf5QnYjgwVo6bMTzOaiPLxfjoZyIIWXHy roKCdbno6uDW9jWcDUlG38ePLcVLH7rCYb8RkXb7mQAnId+XDvCvhL1hgXX7por87WwxBPbgBGL8r gDW4P4gg/OCoH082VQLtVLIeoWDcyMF/MO4oMyjhTlUH46Lkn1N8Hw1BZG4sUZiF/zpAP8mYs8cB3 T6B21zr8QAkKRhSDRz5TKQ==; Original-Received: from [87.69.77.57] (port=4755 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjHFR-00019r-Mh; Sat, 06 Nov 2021 04:40:26 -0400 In-Reply-To: <87pmrdamcw.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 06 Nov 2021 06:23:27 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:278849 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Sat, 06 Nov 2021 06:23:27 +0100 > > Lars Ingebrigtsen writes: > > > There's no limit to the number of these strings that fonts support, so > > if this hypothetical minor mode were to "list them all", it'd > > basically be the same as running all text through harfbuzz. Which we > > don't want to do in general. Ergo the need to have a per-font > > ligature table. > > Well, that doesn't follow. Once we have a way to dump the ligature > tables, we know what ligatures the fonts the user has loaded have (in > total). A typical user won't be loading more than a handful of fonts, > so the number of ligatures at any point won't be more than a few > hundred. > > And since it's harmless (just takes a bit more time) to give a sequence > to hb_shape for a font that doesn't have the ligature, we don't need a > per-font thing. I think this is a premature conclusion. For starters, it sounds like you are thinking only about ASCII ligatures? Non-ASCII scripts have ligatures as well; in fact, in some of them we already pass all the text to the shaping engine, because that's the only way of producing display that users of those scripts will consider valid and legible. And why assume people will not want to disable some ligatures for some fonts, for example if they look ugly? More generally, we don't yet have a complete enough idea about use patterns and wishes of users wrt ligatures in various contexts. At least two separate contexts should be considered: source code (where ligatures are normally limited to operators and symbols) and human-readable text (where people may want the typographical ligatures). As for "a bit more time", I think that conclusion is also premature; I've just shown a benchmark where it is more like "a lot more time". > The primary thing here, though, is to get at the ligature data in an > efficient manner. I guess nothing I can say at this point will convince you this is NOT the most important part, so I'll just shut up ;-)