TERMINAL CORE

Ligatures

Programming ligatures that actually render. => becomes a real arrow. != becomes a real inequality.

Questions this answers

  • How to enable font ligatures in terminal emulator macOS
  • Fira Code ligatures not working in my terminal
  • Which terminals support programming font ligatures?
  • JetBrains Mono ligatures in terminal on macOS

How it works

Programming fonts like Fira Code, JetBrains Mono, Cascadia Code, and Iosevka include OpenType ligature tables that replace multi-character sequences (like ->, ==, !=, |>) with single typographic glyphs. Chau7 detects these ligature substitutions by running Core Text layout on each visible line and checking for glyph replacements that span multiple character cells.

When a ligature is detected, Chau7 renders the substituted glyph across the spanned cells while maintaining correct cursor positioning. The cursor always moves in single-cell increments regardless of visual ligatures, so editing and selection behave identically to non-ligatured text. Ligatures update in real time as characters are typed or output changes.

Ligature rendering is toggled per-profile, so you can enable ligatures in your coding profile while keeping them disabled in a profile used for log viewing where character-exact rendering is preferred. The ligature detection cache is shared with the glyph atlas, so enabling ligatures adds no measurable overhead to the render path.

Why it matters

Programming ligatures improve code readability by rendering compound operators as distinct visual symbols. But most terminals cannot render them because their text engines treat each character independently. Chau7's Metal-based renderer handles ligature substitution correctly, so your Fira Code or JetBrains Mono investment actually pays off in the terminal too.

Frequently asked questions

Which fonts are supported for ligatures?

Any OpenType font with ligature tables works, including Fira Code, JetBrains Mono, Cascadia Code, Iosevka, Victor Mono, and Hasklig. Chau7 reads the font's standard ligature (liga) and contextual alternates (calt) tables automatically.

Do ligatures affect cursor positioning or text selection?

No. The cursor and text selection operate on character cells, not visual glyphs. A ligature that visually replaces three characters still occupies three selectable cells, and the cursor steps through each cell individually.