I've made a calt to add swashed alternatives to beginning and end of every word. I think it's ok, but I'm planning also stylistic alternatives to these swashes and it's here where it gets complicated. I get "Duplicate target glyph for single substitution" error when compiling. This is what i have now:
Classes:
All_glyphs (All glyphs, including swashes. 986 total)
Normal_Caps_Start (Starting glyphs to be replaced. 170 total)
Normal_Caps_End (Ending glyphs to be replaced. 133 total)
Swash_Caps_Start (Starting glyph swashes. 170 total)
Swash_Caps_End (Ending glyph swashes. 133 total)
Code:
feature calt {
lookup start_swashes {
ignore sub @All_glyphs @Normal_Caps_Start';
sub @Normal_Caps_Start' by @Swash_Caps_Start;
} start_swashes;
lookup end_swashes {
ignore sub @All_glyphs @Normal_Caps_End';
sub @Normal_Caps_End' by @Swash_Caps_End;
} end_swashes;
} calt;
I've put calt feature after salt feature.
The problem must be in the way i made the classes. For example letter A has A1 and A2 alternatives. In Swash_Caps_Start this means: [A1, A2, B...], and in Normal_Caps_Start class its [A, A, B...]. This way the substitute classes have the same amount of pairs, but there are two A's in the other class. How is this done correctly?
Probably there is some really simple solution for this, but now i just can't figure it out. I've searched for this, but Google doesn't anymore give the results from Typophile it has used to.