Hi Mohammed,
Best of luck with your new font, yes you can do this with “calt” feature, for example if you need to replace hah-ar after reh-ar
Use this code in calt feature
sub reh-ar hah-ar' by hah-ar.alt;
This is the main formula but you can change it whatever you need.