Here's a thing most developers never think about: the font you're reading code in right now is not a passive box of letter-pictures. It's a small program. Every time you type, it runs — taking the raw sequence of characters you entered and deciding, in context, which shapes to actually draw. What you typed and what you see are not the same thing, and a little rule engine inside the font is the reason.
You've probably met one feature of that engine already, even if you didn't know its name: programming ligatures, the trick where = followed by > quietly renders as a single →, or != becomes a crisp ≠. That's the font noticing a pattern and substituting a different glyph. But ligatures are the loud, slightly divisive example. There's a quieter, cleverer one — built on the exact same machinery — that solves a problem monospaced type has had since the typewriter, and almost nobody notices it's happening. It's called texture healing, and once you see it, you can't unsee it.
Fonts run code: OpenType in one minute
Modern fonts are built on OpenType, and tucked inside an OpenType font is a set of features — rules that transform glyphs based on context. The relevant machinery is called GSUB (glyph substitution): a table of "when you see this sequence of glyphs in this situation, draw those glyphs instead." When your editor or browser lays out text, a shaping engine walks the characters and applies these rules.







