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: How to use "smart kerning" font features in Emacs using composition-function-table Date: Mon, 27 Nov 2023 14:03:13 +0200 Message-ID: <83edgb9zem.fsf@gnu.org> References: <83ttp89zbk.fsf@gnu.org> <83il5o9so6.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="541"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Steve Molitor Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 27 13:04:36 2023 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 1r7aLr-000ASe-NH for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Nov 2023 13:04:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7aKp-0000iE-A0; Mon, 27 Nov 2023 07:03:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r7aKn-0000hj-KI for emacs-devel@gnu.org; Mon, 27 Nov 2023 07:03:29 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r7aKn-0001VW-AQ; Mon, 27 Nov 2023 07:03:29 -0500 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=nilIfh/m2qiiUDm1ugBpBk6Rv8Cke6tt/hvya1HrlIk=; b=YTLoOIc4T9O7 4FF98w86EDfW3ro/BV4oXOOhLtOz2YMS2vPjSlY+8E6cyM1AjhuW5P9CTf0IXWv7K8HWO5lKCa9si QWr4eHcAyD4JE/SVNcIuQ7oi/QinTWtP6kGGZyE3JQrV5LV9xWvoOG+S9jeT5+sgvIt4dlqdVi1ck 2BLz1wrpvWIm+oFnls/BxNfxX+qSx2Ig4ANF6gv8gW/8KW1SFqS42c3TD7mZd8pZ9T5OCpYqTCOQ4 kQZ0ILJAgU0K4BCeguCecjNOqD4C/FL3bBMxa3X/Bds7bYe/PDPnAUEqj3ho99ojleaGeYuRvVeH3 RsnXPFyyXVPcsB6ov5LAhA==; In-Reply-To: (message from Steve Molitor on Sun, 26 Nov 2023 14:42:36 -0600) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313265 Archived-At: > From: Steve Molitor > Date: Sun, 26 Nov 2023 14:42:36 -0600 > Cc: emacs-devel@gnu.org > > For ligature support, I do need something like this for Commit Mono: > > (set-char-table-range > composition-function-table > t > `([" [,-.:;A-Z_a-z><=!&|+-?/\\]+" 0 font-shape-gstring])) Beware: composition-function-table is global, so the above will ligate characters on the mode line as well, which might not be what you want. > > Character composition in Emacs was never meant to be used for ASCII > > characters, nor, more generally, for a significant fraction of buffer > > text, except in several scripts (such as Arabic) where all the text > > must be shaped to be legible. > > Does performance suffer a lot in those languages, like Arabic? It suffers some, yes.