Chain sub rule throwing error in feature editor

Trying the feature code from this example of the official fea spec:

    sub ka ka.pas_cakra.ns by ka;

    sub ka by ka.pas_cakra ka;

    sub ka' lookup REMOVE_CAKRA lookup REORDER_CAKRA ka.pas_cakra.ns' ;

will fail with an “Expected glyph or glyph class” in the third lookup.

1 Like

I ran into the same issue.

I think I will solve it by expanding the chaining rule by myself…

Look at the 3.1.1 release notes. You can use the del rule now.

I don’t think del rule works here.

In the above example The desired behaviour is like below:

ka ka.pas_cakra.ns => ka.pas_cakra ka

or in easier names, a b => c a

and you cannot delete some glyphs to make that behaviour.

And in this case, the rule cannot be written in other way, since sub .. by .. rules basically support only “one-to-many” or “many-to-one”, but not “many-to-many” substitutions.

This is kind of a reordering. I wonder why you need that. Can’t you switch in the ka.pas_cakra contextually in the right position?

I think this kind of “Chained Contextual Substitution” is needed in several Indic scripts.

You can check the original example of Adobe Opentype Feature File here,

and the live example of these rules used in Noto Sans Bengali, in the psts feature rules