Hey all, so I’m trying to write an Ordinal feature that will substitute sequences of letters like TH, RD, and ND with the corresponding modifier glyphs when placed after a number.

I’ve tried all sorts of different things so far but the closest I’ve got to getting it to work is the following:

sub [zero one two three four five six seven eight nine] [A a]’ by ordfeminine;

sub [zero one two three four five six seven eight nine] [O o]’ by ordmasculine;

sub [zero one two three four five six seven eight nine] [T H]’ by [tmod hmod];

sub [zero one two three four five six seven eight nine] [R D]’ by [rmod dmod];

sub [zero one two three four five six seven eight nine] [N D]’ by [nmod dmod];

The problem is that this code doesn’t successfully substitute the second letter.

Any help would be much appreciated!