I don't understand: how does this handle the case where a certain
character has more than 2 alternative glyphs? which alternative will
be selected?

Different glyphs would have different tags.
For example in FiraCode "0" has four alternatives and each one has a different tag:
zero, cv11, cv12, cv13

On Sat, Sep 24, 2022 at 2:09 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
> Date: Sat, 24 Sep 2022 14:04:42 +0530
> Cc: emacs-devel@gnu.org
>
>  Then font-level specification of this would not be as simple as was
>  originally suggested, I think: the characters were missing from that
>  suggestion.
>
> We don't have to specify each character for which we want the stylistic-set, we just simply would have to
> pass the tags
> and hb_shape_full would take care of the rest.

I don't understand: how does this handle the case where a certain
character has more than 2 alternative glyphs? which alternative will
be selected?