From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Steve Molitor Newsgroups: gmane.emacs.devel Subject: Re: How to use "smart kerning" font features in Emacs using composition-function-table Date: Tue, 28 Nov 2023 07:27:49 -0600 Message-ID: References: <83ttp89zbk.fsf@gnu.org> <83il5o9so6.fsf@gnu.org> <83edgb9zem.fsf@gnu.org> <597ce94d-fe8a-4852-81f6-178672d1bef2@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28957"; 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 14:29:21 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 1r7y9P-0007Fn-T2 for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Nov 2023 14:29:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7y8S-0008Pc-81; Tue, 28 Nov 2023 08:28:20 -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 1r7y8J-0008N0-DA for emacs-devel@gnu.org; Tue, 28 Nov 2023 08:28:13 -0500 Original-Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7y8D-0005Yh-DW for emacs-devel@gnu.org; Tue, 28 Nov 2023 08:28:10 -0500 Original-Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-67a095fbe27so40434816d6.1 for ; Tue, 28 Nov 2023 05:28:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701178081; x=1701782881; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NYzMjUrytnhF3MB/dBy6y1ldr6EeVCBJmsceZVPBiKs=; b=C4E5jCKtTj8fPzUikcwQ6I35QnGplWaKWe7xKRQ1MrMpBQ3df55d0qyTlaEt29gjIb ArlHkJPVZ/WBzb3AhxUP1xiHyzc5P3lCe4ZDc2cbfNde9xRSIQlR7MQst7ZOpV4DJcCG bJnEU/EpHNBPFiY6iXbIQ69ss8TZXnINxTZkDicj6txqJ654WD5AWShLqddWKV/xy2r8 1J3jzYarwr/7W5RQ5UykO9h5bOUMkotRhAmcpvtEafew7XT+PmDqDBDBihMRObd3TyzE k0X/RtDv96r6oXefgWDWCc010tyZhxG0x74oYrKz0lejt0iV386plsCSgLlOQL7xH4v2 iTFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701178081; x=1701782881; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NYzMjUrytnhF3MB/dBy6y1ldr6EeVCBJmsceZVPBiKs=; b=BAgteGc/uIF7tEn08fLlGErnOxWRHwXOwTO6aA+DOuA+mgY1UH5842ZJpvCP+KucEe M46ozOQrQJdwtYtUsaWWZNx/PBl+wylt3V6Wp5uk2PAyc4+0btVPCMMQkG/Qft4OZI2D m6GGk1P+vPFqrv/tTb2SPDu2emAUwwUtac7BmfkfNsFXzm13Roevv0SwBKFNrdJnnMjM hrJ62Cv3fVEclWJiwMbbkr4brJz0sZYw/bZbonjOBwlcCBxlY+rEzlq0Qa4N6KXTB/Wc Xh2STdq3U5ovcgg7RlZR9GRefAKHFPFUWa64QUAlWlz86rRxxhjtf15+yo2zCLqauyzg a3pw== X-Gm-Message-State: AOJu0YyQfPQ509QDX5JbsVAmDpFobDu2D7oi+53+xZX1k6DtNJBOrbzJ Rbl+pt3fHsYRGIcQKQUZ97N4FKX3II/ukvRGTmg= X-Google-Smtp-Source: AGHT+IGPLE/UDxbzwivfPcOzCOOwa1SZIn6iV5QWgx/LIL64WtSAJRJGrx1QuPWL4h+AEbaWB+tczDwOfuQ4OnAgioY= X-Received: by 2002:a05:6214:c25:b0:67a:2f1b:dd33 with SMTP id a5-20020a0562140c2500b0067a2f1bdd33mr14831490qvd.2.1701178080541; Tue, 28 Nov 2023 05:28:00 -0800 (PST) In-Reply-To: <597ce94d-fe8a-4852-81f6-178672d1bef2@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::f2a; envelope-from=stevemolitor@gmail.com; helo=mail-qv1-xf2a.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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:313314 Archived-At: Yes, you can make the composition-function-table buffer-local and mode-specific. Here is an example: https://github.com/mickeynp/ligature.el/issues/53#issuecomment-1828732077 Steve On Tue, Nov 28, 2023 at 12:40=E2=80=AFAM Yuan Fu wrote: > > > > 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><=3D!&|+-?/\\]+" 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? 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. > > Yuan >