I've been working on some code and developed a liga feature that creates [fb fh fi figrave fj fk fl] ligatures by replacing the base form of f with a shortened-hood variant. I gather that for Mac compatibility I also need to include fi and fl ligatures as single glyphs.
There's also very narrow f alternates for next to the idieresis and icircumflex.
I have also developed some code that applies to [ff ffb ffh ffi ffigrave ffj ffk and ffl] or any number of fs preceding these letters. It replaces the initial f with a slightly lower-hooded variant (and any following ones that are followed by another f) and the final f by the shorter version. That way I don't need to create new glyphs for all these combinations and for the [fff] variants.
Here's the code:
feature liga {
sub f'f by f.low;
#lowers the hood of any fs except last in chain
sub f' [b h i igrave j k l] by f.medium;
#shortens the hood of normal height f
#which is last in chain
sub f' icircumflex by f.short;
sub f' idieresis by f.shortest;
sub T' h' by Th;
} liga;
Question is can anyone see any problems with doing things this way? And is there any way to neaten up the code further? I'm not a programmer but it works.