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: Tue, 28 Nov 2023 16:20:57 +0200 Message-ID: <83fs0q7yd2.fsf@gnu.org> References: <83ttp89zbk.fsf@gnu.org> <83il5o9so6.fsf@gnu.org> <83edgb9zem.fsf@gnu.org> <597ce94d-fe8a-4852-81f6-178672d1bef2@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 28 15:21:51 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 1r7yyF-0006NP-0W for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Nov 2023 15:21:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7yxq-0001eB-4p; Tue, 28 Nov 2023 09:21:26 -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 1r7yxo-0001e2-Sq for emacs-devel@gnu.org; Tue, 28 Nov 2023 09:21:24 -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 1r7yxo-0000oO-Ka; Tue, 28 Nov 2023 09:21:24 -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=Vb1/DbYNjRnXjJmb3TMPjRj5ThyREa7HeWGyS5v6+nM=; b=Qugzm3q8FB27 WQ435fgCzs7CDN5DyrTWsfEUFYcIKlvx3lNsn2tA7qOO6EbcL7PV/XE6RT4Hl8RCwvuG2hS1xUu0k kb3XdR9BrwrMO9+34rzgrL/ykpEf02gOkBkz3bj2Vu9Z3Jq4R4JqdlgAMRZrhf3lwAB/tQfonvTuo 8BxpTC5PYkmU6IBq/lsL4iI6RWiDS56QLW4X9bbM7JsNNEIVWAi6jBQrZBa79VR43AWMm5kGz1CSt KxoAIvLPnw/cRvmPLPCHPckVP2bMgMVAOpqKZKLI8TYSc3XY3EoE6gDPtPrGMoXS9Bzr+2DGHO9B4 9KbpawWnssS8Y9DfrxhZxA==; In-Reply-To: <597ce94d-fe8a-4852-81f6-178672d1bef2@gmail.com> (message from Yuan Fu on Mon, 27 Nov 2023 21:18:18 -0800) 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:313319 Archived-At: > Date: Mon, 27 Nov 2023 21:18:18 -0800 > From: Yuan Fu > > > > On 11/27/23 4:03 AM, Eli Zaretskii wrote: > >> 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. > Is there any way to make it local? If I make composition-function-table > buffer-local and set the buffer-local variable, would it work? It will work to affect compositions when the buffer is the current one, but it will not work to avoid compositions on the mode line of the window(s) which display(s) that buffer. > The use-case I'm thinking about is using Commit Mono for Info > buffers and help buffers, which have large bodies of monospaced > text. The improved readability would help a lot there. I think if you like these features enough, you should want it in any major mode that displays human-readable text. But that's me.