Contextual Substitutions

I am greenhorn with opentype feauters so the question is really basic, but I still can not find the answer :slight_smile:
I designed few basic icons and I would like them to be substituted with certain sequence of letters. For example: when I type word heart I would like it to be substituted with my icon heart.
I found tutorial but it is substituting only the last letter in sequence and not the whole word.

Thank you very much!

This is not a contextual substitution, but a ligature substitution. Call your glyph h_e_a_r_t (for a discretionary ligature) or h_e_a_r_t.liga (for a standard ligature), and then update your features.

Generally, this is not a good idea, because it is language-dependent. But for a special-purpose font, it may be OK.

Thank you very much!