I have a question about the order of calt rules. I hope my commenting here has made this clear enough. Everything works perfectly all together EXCEPT for one rule (which I’ll explain below).
If I use ONLY that one rule, it works perfectly (meaning it’s not that specific rule that’s the problem).
So it seems I have a conflict here, but I would think that the order of my rules here would “fix” that conflict. Apparently I’m wrong about that.
Here’s what I’ve got, with comments to try to help make this really clear. I am finalizing a casual script font in which six of the letters do not connect to the letters after them (but the font includes connected version of all six letters as options, and I’m using calt to make it so that any problematic or ugly combinations are substituted with the connected versions).
// Always have a connected letter before z
sub [@basic-unconnected]’ [z zacute zcaron zdotaccent] by [@basic-connected];
//Always have a connected letter before r.calt
sub [@basic-unconnected]’ [r.calt racute.calt rcaron.calt rcommaaccent.calt] by [@basic-connected];
// Fix awkward W interactions
sub [W Wacute Wcircumflex Wdieresis Wgrave ]’ [ i idotless iacute icircumflex idieresis idotaccent igrave imacron iogonek l lacute lcaron lcommaaccent lslash t tbar tcaron tcedilla tcommaaccent ] by [W.calt Wacute.calt Wcircumflex.calt Wdieresis.calt Wgrave.calt ];
// After a space, never have a disconnected letter
sub space [@basic-unconnected]’ by [@basic-connected];
NOTE: Because @basic-connected includes r.calt, this rule can lead to having space/r.calt, which is bad and needs to be avoided - I have dealt with this with a separate rule below, but that’s the rule that is not being applied properly
// After a space, never have r.calt (instead, have r.init)
sub space [r.calt racute.calt rcaron.calt rcommaaccent.calt]’ by [r.init racute.init rcaron.init rcommaaccent.init];
// Never have two unconnected letters in a row (change the first one to connected)
sub [@basic-unconnected]’ [@basic-unconnected] by [@basic-connected];
Note: This rule can theoretically lead to having space/r.calt, which as I said above is bad, but it comes after the rule in which r.calt would already have been changed to r.init (r.init is not in @basic-unconnected, so it shouldn’t be affected by this rule)
//Never have r after r.calt (change the second to r.calt as well)
sub [r.calt racute.calt rcaron.calt rcommaaccent.calt] [r racute rcaron rcommaaccent]’ by [r.calt racute.calt rcaron.calt rcommaaccent.calt];
So when I have all of that and then type, for example, space-r-a what I want to have as the result is space-r.init-a but instead I am getting the result space-r.calt-a
When I test it with other stuff around to see if every single rule is working, the result is that every rule is applied EXCEPT for
// After a space, never have r.calt (instead, have r.init)
sub space [r.calt racute.calt rcaron.calt rcommaaccent.calt]’ by [r.init racute.init rcaron.init rcommaaccent.init];
Can anyone help me figure out how to fix this? Does the order of the rules not matter? And if it doesn’t, then what can I do here? I’m sure it must be possible!