emacs-devel
[Top][All Lists]
Advanced

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

Re: Supporting stylistic sets


From: Eli Zaretskii
Subject: Re: Supporting stylistic sets
Date: Sat, 24 Sep 2022 09:33:24 +0300

> From: Visuwesh <visuweshm@gmail.com>
> Cc: lumarzeli30@gmail.com,  emacs-devel@gnu.org
> Date: Sat, 24 Sep 2022 10:29:12 +0530
> 
> [வெள்ளி செப்டம்பர் 23, 2022] Eli Zaretskii wrote:
> 
> >> Unless there are performance implications, I don't see why using an
> >> anonymous face won't work i.e., 
> >> 
> >>     (propertize "text" '(face (:stylistic-set ("cv01" ..)))
> >
> > How is this different or better than having a special text property?
> 
> It has the added advantage of being able to easily alter existing code
> to use stylistic sets.  E.g., if I want outline headings to use the
> small caps set, then I can change the relevant faces which is much
> simpler than writing new code to put the special text property.

I'm not talking about changing the existing faces, I'm talking about
the above proposal to use propertize.  That is exactly equivalent to
putting a named text property on the text, isn't it?  IOW, the text
property you use to request stylistic variants doesn't have to be
'face', it can be some other property specifically designed for this
purpose.

Using faces for this introduces complications and performance aspects
that we had better avoided, unless we really must have this as part of
a face.



reply via email to

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