Calt Feature for a Connecting Script

Hi everyone,

I’m having trouble figuring out how to make the calt feature work for a connecting script. My regular letter forms are connecting in the middle — no problem there. I have initial and final forms, then I have some top connecting alternatives I would like to have with the calt feature. They are divided into three classes: tcRightSub (forms that connect top right), tcLeftSub (connect top left), topConSub (forms that connect both top left and top right). Here’s the example with the letter o:

Here is an example of what I would want to get with the calt feature (the Cyrillic el there is the only regular medial form letter):

Now, I know my code is wrong, but here it is, please let me know how to fix it:

# BEGIN POSITIONAL ALTERNATES

lookup IsolForms {
	ignore sub @isolDef' @AllLetters, @AllLetters @isolDef';
	sub @isolDef' by @isolSub;
} IsolForms;

lookup InitForms {
	sub @UCnotConnected @initDef' by @initSub;
	ignore sub @AllLetters @initDef';
	sub @initDef' by @initSub;
} InitForms;

lookup TopConnectedRight {
	ignore sub @tcRightDef' @elem;
	ignore sub @tcRightSub @tcRightDef';
	sub @tcRightDef' by @tcRightSub;
} TopConnectedRight;

lookup TopConnectedBoth {
	ignore sub @topConDef' @elem;
	sub @tcRightSub @topConDef' by @topConSub;
	sub @topConSub @topConDef' by @topConSub;
} TopConnectedBoth;

lookup TopConnectedLeft {
	sub @tcRightSub @tcLeftDef' by @tcLeftSub;
	sub @topConSub @tcLeftDef' by @tcLeftSub;
} TopConnectedLeft;

lookup FinaForms {
	ignore sub @finaDef' @AllLetters;
	sub @finaDef' by @finaSub;
} FinaForms;

lookup UCOverhang {
	sub @UCOverhang @shortDef' by @shortSub;
} UCOverhang;

# END POSITIONAL ALTERNATES

This is what the current calt feature code produces:

OK, I figured it out. I was missing a third ignore sub for the TopConnectingRight.

lookup TopConnectedRight {
	ignore sub @tcRightDef' @elem;
	ignore sub @tcRightSub @tcRightDef';
	ignore sub @topConDef @tcRightDef';
	sub @tcRightDef' by @tcRightSub;
} TopConnectedRight;