2 rlig and ss01 between

If I have 2 rlig (one is auto) and one stylistic set (ss01) between those rlig
what happens in font export? 2 rlig combine and stand on top of ss01? what can I do if I want ss01 to run exactly between rligs?

Are you talking about the order of your features? Can you show what you mean by ss01 running “between” the rlig? It sounds like you want something like .ss01.rlig.

Hi @SCarewe
when I export this file both rlig combine and stand on top of ss01
for me, that’s an error in my font
how can I fix this?
Screen Shot 2024-08-13 at 21.29.50

Can you explain what you are trying to achieve? What is your code in the second rlig feature?

In ss01 I have reversed Yeh in arabic and in second rlig I have many ligaturs for simple Yeh
these to had conflict with each other, then ss01 must be on top of those rlig so it can execute in font.
If all rlig combine top of ss01, thats not execute in some words.

It is fine to have multiple features with the same name and others in between. The lookups will be applied in the right order.

Maybe not in my font. I did this before but now order is not consider

What I do now?

It seems that I don’t understand the problem. Can you explain what you are trying to and what happens differently as you expect?

Lookups for certain features are always applied in a specific order. In this case rlig lookups are applied before stylistic sets lookups in Arabic, regardless of their order in the font. You will need to use a different feature tag instead of rlig. I think rclt would work.

I didn’t know that. Thanks. Why do they do that. The spec page shows a feature oder but it could be read as a recommendation to do it that way.

That is how MS does it and many fonts break otherwise. I think the order is specified in the script specs and USE spec (sometimes the pages are outdated, in HarfBuzz for example things are often reverse engineered based on how MS implementation handle fonts).

Simon has a graphic showing the feature grouping and order for different scripts in HarfBuzz, but I keep forgetting where it was posted.

This is the version of his image that I keep stashed for reference:

You can also select a script here to get its specific feature order:

1 Like

Salam @khaled
So I can’t use rlig and I have to use rclt, right?
@GeorgSeifert .
why glyphs shows correct in edit view and not at font export?

Yes.

RCLT also applied before stylistic sets.

No, I test it, that’s not work.
I don’t know what I do now???

It works for me. I have an ss02 feature with lookups before those of rclt’s and the rclt substitutions are applied to the glyphs that result from ss02 substitutions. I used this in several fonts and it works in all of them.