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 22:39:16 +0530

On Sat, Sep 24, 2022 at 9:44 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
> Date: Sat, 24 Sep 2022 21:20:03 +0530
> Cc: emacs-devel@gnu.org
>
> On Sat, Sep 24, 2022 at 8:52 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
>  > From: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
>  > Date: Sat, 24 Sep 2022 20:32:26 +0530
>  > Cc: emacs-devel@gnu.org
>  >
>  > no, the same would work
>
>  Then I don't understand how will HarfBuzz know to apply the first tag
>  to 'i', but the second one to 'l'.
>
> The font file has a GSUB table for this purpose

I'm sorry, I still don't understand.  (I'm not an expert on fonts, so
I'd appreciate a slightly more detailed explanations.)  Are you saying
that each tag can be used by a single character in a font?  IOW, no
feature tag can ever be shared by two or more characters in a font?

IIUC, then yes.
 
The HarfBuzz docs says:

  The hb_feature_t is the structure that holds information about
  requested feature application. The feature will be applied with the
  given value to all glyphs which are in clusters between start
  (inclusive) and end (exclusive).

This seems to say that we need to set START and END of each feature to
buffer positions of the characters to which we want the feature to be
applied.  That is why I said that START and END should be set
separately for each feature, according to the positions of the
corresponding characters in the buffer submitted to hb_shape_full.

I don't think that is the case, I have attached a slightly modified harfbuzz-tutorial[1],
where I have defined four features for a,g,i and l respectively with the same start and end variables.
It works as expected.

You can provide it with the path to a firacode font file and the text which it has to display and it will produce a png.

[1] https://github.com/harfbuzz/harfbuzz-tutorial

reply via email to

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