Can you write nested lookups???

Here is example:

Feature Calt{
            script DFLT
            language xxx
                  lookup1{
                      sub1
                      sub2
                      ----
                }lookup1

                  lookup2{
                      sub7
                      sub8
                      ----
                }lookup2

                  lookup3{
                      sub14
                      sub15
                      ----
                }lookup3
} Calt;

Can all above lookups ( not all subs ) will be processed one by one???

if I combine all lookups like:
lookup1{ 
        sub1
        sub2
        .....
        sub20
}lookup1
all subs will be processed or just processes one sub and exit???

Comments

  • RichardW
    RichardW Posts: 100
    In the multi-lookup case, the lookups will be processed one-by-one.

    In the one-lookup case, at most one sub will be processed at each position in the glyph stream.  Some subs may advance the position by more than one glyph.
  • WAY KYI
    WAY KYI Posts: 130
    edited August 2022
    Thank you very much Mr. RichardW, this is very helpful. So like, ligature sub may skip more than one glyph. If any of you using Fontlab, I have a font with 3 separate Calt features I created in Fontforge are rounded up in big one lookup and no longer behave the same as font exported from FF. I think that is wrong and I am trying to implement nested lookup in FL to get the same result as in FF. Thanks