emacs-devel
[Top][All Lists]
Advanced

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

Re: Supporting stylistic sets


From: समीर सिंह Sameer Singh
Subject: Re: Supporting stylistic sets
Date: Sat, 24 Sep 2022 10:13:47 +0530

That means all text that uses the font will use that stylistic-set.
Is that good enough?  What if you want to have the same font with and
without a specific stylistic-set in the same document?.

Isn't the point of stylistic-set is that if you don't like a particular glyph of a font you can interchange it for another, therefore I don't
see why someone would have the same font with and without the stylistic-set in the same document.
For example: Tiro Bangla had set the stylistic set because the users could not agree how the হ্+ন and হ্+ণ conjuncts should look[1].
It is the case for FiraCode too, simple variations of glyphs which the user can switch out according to their preference.

And if the font is not the default face's font, it means you need to
setup a special face for using it anyway.

You mean for scripts like Bangla, Devanagari etc?
For them defining their font-spec wouldn't work?

[1]: https://github.com/TiroTypeworks/Indigo/issues/30

On Fri, Sep 23, 2022 at 11:25 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
> Date: Fri, 23 Sep 2022 22:57:41 +0530
> Cc: emacs-devel@gnu.org
>
>  How did you envision this font property to be used in Emacs?
>
>  The etc/TODO item for that suggests to implement this as a text
>  property instead.  That is, of course, not carved in stone, but I
>  think we should in any case decide on how this will be used from Lisp
>  before we talk about how to expose it to Lisp.
>
> I imagined that it would be something like this:
>
>   (set-fontset-font t 'bengali
>    (font-spec :family "Tiro Bangla"
>       :stylistic-set '("ss03")))
>
>   (set-face-attribute 'default nil
>      :font "Fira Code"
>      :weight 'regular
>      :height 170
>      :stylistic-set '("cv01" "ss05" "ss03"))
>
> Just like how weight, foundry, size etc are set and they seem to be font properties.

That means all text that uses the font will use that stylistic-set.
Is that good enough?  What if you want to have the same font with and
without a specific stylistic-set in the same document?.

And if the font is not the default face's font, it means you need to
setup a special face for using it anyway.

So I think a font attribute is not flexible enough for Emacs.  But I'm
interested in what others think.

reply via email to

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