[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use "smart kerning" font features in Emacs using composition-

From: Eli Zaretskii
Subject: Re: How to use "smart kerning" font features in Emacs using composition-function-table
Date: Tue, 28 Nov 2023 16:20:57 +0200

> Date: Mon, 27 Nov 2023 21:18:18 -0800
> From: Yuan Fu <casouri@gmail.com>
> On 11/27/23 4:03 AM, Eli Zaretskii wrote:
> >> From: Steve Molitor <stevemolitor@gmail.com>
> >> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]