OpenType & shaping
Contextual alternate
An alternate glyph selected based on the surrounding glyphs.
Example
Neighbor glyphs → alternate form
A handwritten font can change a letter beside a neighbor to make their connection more natural. OpenType commonly uses the calt feature for this.