How to apply multiple ligatures in the same word?

I’m learning type design and currently working on a script font. I’m stuck with the following situation.
I’ve created two standard ligatures:
t + h → t_h.liga
h + e → h_e.liga
After updating and enabling the liga feature, when I type word “the”, Glyphs applies the “t_h.liga” but not the “h_e.liga”. I understand that the first matching pair is processed, so the following character is not considered for another ligature.
Is there a way to make both ligatures work together so that “the” displays using both the th and he ligatures?
I was advised to create a separate three-letter ligature, such as “t_h_e.liga”, but that doesn’t seem practical because there could be thousands or even millions of such combinations in a script font.
What would be the recommended approach for handling this situation?

You can add a t_h_e.liga glyph which will be used instead of t_h.iga when possible.

Otherwise, there is no way for two ligature glyphs to overlap and share their right/left half.


Another approach is not using ligature glyphs and instead creating contextual alternatives. That way, there would be an alternative t glyph that is used when it is followed by h and an alternative e that is used when following an h and an alternative h that is used when between t and e. This is more work up front, but it composes better once accented letters are considered. The feature code would need to be written manually and could look something like this:

sub t' h by t.h_;
sub h e' by e._h;
sub t h' e by h.te;