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 09:12:59 +0200 Message-ID: <83zgqhbvus.fsf@gnu.org> References: <87cznths5j.fsf@gnus.org> <8ff3b131c5fe09753ca0@heytings.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18347"; 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 08:14:12 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 1mjFu0-0004Ym-3b for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Nov 2021 08:14:12 +0100 Original-Received: from localhost ([::1]:60966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjFty-0006QE-60 for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Nov 2021 03:14:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjFt6-0005ir-Da for emacs-devel@gnu.org; Sat, 06 Nov 2021 03:13:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjFt5-00078w-Cd; Sat, 06 Nov 2021 03:13:16 -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=PB+iFPCTadYRiaK+naPLJt/sPT9YCkNnKkHBfXqYTz8=; b=kx3k/HnGLp+8 H5Lh9D2HcXx9LyzIhmB1AU9yK+9kneb4d25AtTC7JzDykmbiSHCR3m3EwXPfpmmyvCJ8mA2tl2oQx LYCdZB+TFIxWEPaqjp3PVvHdNEIMMsnwIk/5b+Q05Ty+U2mVNgBvuhWf+i1Hy/7SZLVPEFjY/Tu1g 6eTnfg8gj0EUV5+NHFBX8AqSAsaf7CNwm1mZR9BlbOHR/ezyWzuk7EP/OQXvmVcWENW4VMv3CoppY XtFtdlShi6k7lFqT2y18VIqBmtuPDhLEE+IlM6cNs8RAGTgtaKeRJ5i/Fmj+f8KztJDDnLpxK79X8 sin4pSABE8FXPtIW2UqZmA==; Original-Received: from [87.69.77.57] (port=3305 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 1mjFt4-0001WT-GN; Sat, 06 Nov 2021 03:13:14 -0400 In-Reply-To: <87k0hmgre3.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 05 Nov 2021 23:38:12 +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:278846 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Fri, 05 Nov 2021 23:38:12 +0100 > > Heh; there's some glitches here -- the leftmost swoosh is so extensive > that it doesn't paint it correctly, and: > > Entering some spaces at the start doesn't clear up all the artefacts. Probably some display glitches because we don't expect characters to reach so far to the left. Note, however, that displaying this correctly will slow down redisplay, because any change in the "swish" area will need to redraw all the characters of that word. This will be in particular painful when the only change is that cursor moved in the same screen line: we'd probably need to disable one of the more powerful redisplay optimizations we have. > > I think we rather need to have a (minor) mode which uses those, and > > under that mode we do want to pass these strings to HarfBuzz. If the > > default font doesn't support the corresponding ligatures, we display > > the literal strings. It is then up to the user to install the right > > font and tell Emacs to use it (via some face, I guess). > > Yes and no. 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. I don't necessarily agree with the conclusion. The list of ligatures will have to be customizable, that's a given. Thus, the user will always be able to add/remove ligatures. Whether we should have a built-in tool to show all the ligatures supported by a font is an orthogonal question, because there are (external) tools out there to do that, and we don't have to duplicate their functionality. (I also think that the list of ligatures depends on the script and the language, so the response to such a query is not necessarily a single list.) This is not, and should not be, the area of our expertise. We delegate that to a shaping engine for a good reason.