Simple feature code to replace two letters with another two letters

I want to replace er with er.ss01 is there a feature I can write this into so it’s done by default? Sorry for a silly question its been a while, or do I need to create a ligature? I would rather it not be a ligature cus I might want that also.

The top “er” replaced with the bottom “er”


You can do it in two steps. Wrap the first step in a lookup to apply that change first.

lookup firstLetter{
	sub e' r by e.ss01;
} firstLetter;

sub e.ss01 r' by r.ss01;

Note that it turns both e r and e.ss01 r into e.ss01 r.ss01. You can also sub second letter first, which can be better sometimes, depending on how else those letters are used.

Thanks for that, so I put that in a calt feature. Will that make it happen by default or does the user have to click something?

Sorry for the dumb questions.


It depends on the app, but afaik calt is a good choice since it’s on by default in most cases.