Hi there,
I've created a font that has 3 character variations using calt (which works fine) and includes a set of 3 swash variations per character as well. The issue I'm having is I also want to include start and end swashes for select letters (a, e, i, o, r). I set up my code as such and it works perfectly fine in FontLab when I test it but when I try in Illustrator, only the start_swsh works. The end of the word remains normal.
feature swsh {
ignore sub @ALL @letter1' @ALL;
ignore sub @ALL @letter2' @ALL;
ignore sub @ALL @letter3' @ALL;
sub @letter1' @ALL by @start_swsh;
sub @letter2' @ALL by @start_swsh;
sub @letter3' @ALL by @start_swsh;
sub @ALL @letter1' by @end_swsh1;
sub @ALL @letter2' by @end_swsh1;
sub @ALL @letter3' by @end_swsh1;
sub @swsh1' by @swsh2;
} swsh;
I've been reading a lot of forums about it, and have seen people say you need to have different lookups for the start and the end, but I don't understand the code (when I type in 'lookup ____' I don't know if I'm suppose to have _____ somewhere else that it's looking up, or how that works, and the FontLab manual doesn't go into detail about this.)
I'm at my wits end with this, any help would be greatly appreciated.




"It's not possible to test for the start or end of a line of text in OpenType"
Thats true, but you can substitute first letter in the line:
In the font I made the glyphs .init (these upside down)
languagesystem latn dflt;
languagesystem DFLT dflt;
@all=[a-z A-Z ];
@all.init=[a.init-z.init A.init-Z.init ];
@all.i.sp=[a-z A-Z a.init-z.init A.init-Z.init space period comma ];
lookup calt1 {
sub @all' by @all.init ;
} calt1;
lookup calt2 {
sub @all.i.sp @all.init' by @all ;
} calt2;
feature calt {
lookup calt1;
lookup calt2;
} calt;