From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu 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:57:34 -0800 Message-ID: References: <83ttp89zbk.fsf@gnu.org> <83il5o9so6.fsf@gnu.org> <83edgb9zem.fsf@gnu.org> <597ce94d-fe8a-4852-81f6-178672d1bef2@gmail.com> <83fs0q7yd2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16652"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 29 01:58:34 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 1r88uQ-00047T-AW for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Nov 2023 01:58:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r88tb-0004P3-5f; Tue, 28 Nov 2023 19:57:43 -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 1r88tY-0004OW-ST for emacs-devel@gnu.org; Tue, 28 Nov 2023 19:57:40 -0500 Original-Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r88tW-0007WA-Em; Tue, 28 Nov 2023 19:57:40 -0500 Original-Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1cfb2176150so31615665ad.3; Tue, 28 Nov 2023 16:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701219456; x=1701824256; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=RLsOqLcWYShgH3cHO22rceXVXcjqhTrbsHQ+8nq4iAA=; b=Ud7yqip/V1IkTdXbJXGaq3Y0EieRzLvvlO8r89LCg2d8FG1Vqco+P/ailNqKKTAZy5 Mwpiflp80KbpMsHQA37j+AalPpEYsg8YZJs5Zi58MlYyhBRf0YLImJx3UKPnj0ZI2hse bYcA6Xypp3xy4ctC59N1ThwrvaBOKplpuM8QgNp8K+QbReUkF/YRuAudRiXPclCMHLNB /T3U0MeB/xeV9VPq0A0NOMNbmUGkkL/eFZsvicddmvpxMPZi07e61CxQrNANQTSrn2y5 SMpp7sEmgRorURi5VDnm1ezzLDo1bG2O2q1aCI5hiMtUkrE/YWpSeNZ8tojIzsTIm178 zdKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701219456; x=1701824256; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RLsOqLcWYShgH3cHO22rceXVXcjqhTrbsHQ+8nq4iAA=; b=tnSig9jDVKZfu6gd5lJg4GIk70l+LLhyTeVA5r4nSjreYdCXNSdzLqWDD6nT4I0RRF +jYNzuh3YswFJ3gNAR0X8Mtdyw2hRZYXK3Zm1n6KMsZB+O+fHM6KW982A2q0b4f0ahMW ptlF5/0UfrP999k+S1+U3L6tMIJx2NRdZ8fId/vsotynhDZiYISplMiI6qEjbN5R39l1 D0CKTqCpBKvGdxGENkPG9CIwcbT+aElb4iRdwAEqfNuBmguOmvx8AjEiZBXYR3FITYuf o/1CBj2J8JZZ1+BXIgK40RxGllhJz9HXaYOebf71VaLfaozuJ5Phy58PQFhNgK/cwWaA J0Wg== X-Gm-Message-State: AOJu0YyAGiWi0QKjo8joltM12Q4vHy5XvrusMa45xanmBJY8XNTuO20w 8eyqi2gkTMZ999K/SU8qepzmjqBnvrD5Lw== X-Google-Smtp-Source: AGHT+IE7qTdnXz+sHp6Xj3IGynaCsPxFGVPiOZ4bxmJhj84/TUtxx+IwUtvsK/mWhdYVCGdkQZT+fw== X-Received: by 2002:a17:902:ead2:b0:1cf:63bb:82a6 with SMTP id p18-20020a170902ead200b001cf63bb82a6mr15448364pld.65.1701219456144; Tue, 28 Nov 2023 16:57:36 -0800 (PST) Original-Received: from [192.168.1.7] (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id u12-20020a170902bf4c00b001c74df14e6fsm1917394pls.284.2023.11.28.16.57.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Nov 2023 16:57:35 -0800 (PST) Content-Language: en-US In-Reply-To: <83fs0q7yd2.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=casouri@gmail.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-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=ham 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:313344 Archived-At: On 11/28/23 6:20 AM, Eli Zaretskii wrote: >> 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. Cool! >> 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. I tend to you variable width fonts for human-readable text whenever possible. But for Info and help buffers, very often the content relies on monospacing for text layout. So I can't use variables-width font for those. Yuan