Is there a token/predicate to Ignore an entire category?

I am trying to have the dashes higher when in between 2 uppercases. And I would like eventual spaces around the dash to be ignored.

This is the code I have now:

pos [$[case==upper]] [hyphen endash emdash]' [$[case==upper]] <0 58 0 0>;

pos [$[case==upper]] [$[subCategory like 'Space']] [hyphen endash emdash]' [$[case==upper]] <0 58 0 0>;

pos [$[case==upper]] [hyphen endash emdash]' [$[subCategory like 'Space']] [$[case==upper]] <0 58 0 0>;

pos [$[case==upper]] [$[subCategory like 'Space']] [hyphen endash emdash]' [$[subCategory like 'Space']] [$[case==upper]] <0 58 0 0>;

Is there a way to simplify it with some kind of “Ignore subCategory like ‘Space’” thing or some kind of “lookupflag IgnoreSpace”?

I would make a group of all the spaces in your font.

I don’t think you can skip the spaces automatically, but using named classes helps maintain the code:

@Upper = [$[case==upper]];
@Dash = [hyphen endash emdash];
@Space = [$[subCategory like 'Space']];

pos @Upper        @Dash'        @Upper <0 58 0 0>;
pos @Upper @Space @Dash'        @Upper <0 58 0 0>;
pos @Upper        @Dash' @Space @Upper <0 58 0 0>;
pos @Upper @Space @Dash' @Space @Upper <0 58 0 0>;