I have started to experiment with code to support special glyph forms based on shapes of neighboring glyphs. For example:
Round Left, x, Round Right
Round Left, x, Flat Right
Flat Left, x, Round Right
Flat Left, x, Flat Right
Diagonal Left, x, Round Right
Diagonal Left, x, Flat Right
Diagonal Left, x, Diagonal Right
Round Left, x, Diagonal Right
Flat Left, x, Diagonal Right
Note: x= is the glyph to be modified
Note:
Round Right = o,b,e etc
Round left = o,d,q etc
Flat Right = n,d,u etc
Flat Left = n,b,u
Diagonal Right= v,w,y
Diagonal Left= v,w,y
I understand how to do the classes now but I am not sure in a calt expression how you would best order things. I suspect that you would pick a standard say for instanace 'Flat' and make that the default. Then it's a matter of making the class' for Round, Diagonal, and for ligatures and special cases. That is fine.
What I don't seem to be able to do is to effectively figure out is what is the smart way of doing this.
This is what I did so far was this. I did it for an 'f' whose crossbar I am altering gently. It seems to be working.
sub @rnd.rt f' @rnd.lft by f.rnd.bth;
sub @rnd.rt f' @flat.lft by f.rnd.lft;
sub @flat.rt f' @rnd.lft by f.rnd.rt;