Can’t get contextual mark attachment to work

Hello,
I updated to 3.2 (3197).
Having the same issue with contextual anchors.

Please resolve.
Thanks and regards.

Have you fixed your context? You have to write

reh-ar.fina *

Because the reh is before the glyph that gets the mark.

It still does not seem to work. Should I decompose the letters in ccmp beforehand?

So basically it won’t work unless you decompose the glyphs in ccmp. For example, if you need to move the dot below beh-ar.init when having reh-ar beforehand, you need to decompose beh-ar and beh-ar.init then add the contextual anchor.
It seems to work in FontGoggle but not in Indesign (even kern don’t work) my bad it was an old installation of the font in FontBook.

Yes. You can’t control individual components of composite glyphs using layout tables. To do so you need them as separate glyphs.

It should work in InDesign, make sure it is up to date and you are using World Ready Composer (and you are actually testing the new font not a cached old version)

1 Like

My bad, it was indeed an old version installed in FontBook.

One other thing, adding another mark will break the context.

You can add a mark filtering in the anchor context. Add lookupflag UseMarkFilteringSet @AnchorClass; before your context.

1 Like

Thanks for your reply :pray:t2:
It kind of works, check the video below.
This is what I put in the anchor context:

lookupflag UseMarkFilteringSet @AnchorClass; reh-ar *

Demo here

You want the mark filtering set to include only the dot(s) below, so @AnchorClass should be replaced with something like [dotbelow-ar twodotshorizontalbelow-ar] etc (you can define a class in the features tab and use it here).

I don’t know what @AnchorClass includes, is this a magic class that includes all marks that has this anchor (this seems to be undocumented)? If so it won’t help here as it will include other marks below like the kasra that use the same anchor (it would work of dots used a different anchor than the vowel marks).

1 Like

I updated the class as you mentioned and it worked as expected. Thanks Khaled.

1 Like

I needed this again, so I worked to make glyphLib support it (PR not sent yet). I don’t know if inline contextual syntax is possible, but glyphsLib already uses explicit lookup references, so I went for that. The generated code looks something like this for a lookupflag UseMarkFilteringSet @dotsbelow; @reh * context:

markClass dotbelow-ar <anchor 73 282> @MC_dotbelow;

lookup mark2liga_1 {
    pos ligature behDotless_behDotless_ain-ar
        <anchor 730 -300> mark @MC_dotbelow
    ligComponent
        <anchor NULL>
    ligComponent
        <anchor NULL>;
} mark2liga_1;

lookup mark2liga_contextual {
    lookupflag UseMarkFilteringSet @dotsbelow;
    # @reh *
    pos @reh [behDotless_behDotless_ain-ar] @MC_dotbelow' lookup mark2liga_1; # *dotbelow_1
} mark2liga_contextual;