afdko icon indicating copy to clipboard operation
afdko copied to clipboard

Things fea can't do: wildcard / class 0 substitutions

Open simoncozens opened this issue 4 years ago • 0 comments

In a class-based (format 2) substitution, class 0 can be used to specify "all glyphs not in this set". This allows you to effectively do "wildcard" contextual substitutions (and positionings), which, if fea supported it, could be expressed something like this:

   sub a b' * c by d;

Because classes have to be non-overlapping, this would require emitting two rules: one to cover the post-context case "c c" and one to cover the post-context case "not-c c". But it's something that can be done in OTL, but not in fea.

simoncozens avatar Aug 02 '20 07:08 simoncozens