Skip to content

Ligatures

Each style includes 126 Fira Code (v3.1) programming ligatures in the OpenType calt feature, added through Ligaturizer's LigatureCreator. Every ligature preserves the strict one-cell-per-character monospace layout using Ligaturizer spacer glyphs.

Specimen

calt enabled
-> => != === <= >= |> <| || :: ... /* */ <!-- -->
calt disabled
-> => != === <= >= |> <| || :: ... /* */ <!-- -->

Enabling ligatures

Programming ligatures live in the OpenType calt (Contextual Alternates) feature. Most editors and terminals enable calt when ligatures are turned on:

{
  "editor.fontFamily": "'Automata Mono', monospace",
  "editor.fontLigatures": true
}
code, pre {
  font-family: "Automata Mono", monospace;
  font-variant-ligatures: contextual;
  font-feature-settings: "calt" 1;
}

Turn off calt ("editor.fontLigatures": false or font-feature-settings: "calt" 0) to show plain operators. With calt disabled, every character shapes identically to Roboto Mono.

Exclusions

Eleven Fira Code ligatures are deliberately excluded:

&& ~@ \/ .? ?: ?= ?. ?? ;; /\ www
  • &&, ~@, \/, .?, ?:, ?=, ?., ??, ;;, /\ are omitted to avoid visual ambiguity in common operators and punctuation sequences.
  • www is excluded because Fira Code's condensed letters do not match the height and shapes of Roboto Mono's lowercase.
  • Fira Code v3.1 (the revision pinned by Ligaturizer) has no ~= ligature.

Weight matching

Each style takes its ligatures from the Fira Code weight whose operator stroke thickness best matches Roboto Mono. Roboto Mono draws its operators lighter than its letters, so matching is based on hyphen thickness at 2048 UPM rather than nominal weight names:

Automata Mono Fira Code Hyphen thickness (Roboto / Fira, 2048 UPM)
Thin Light 54 / 122
Light Light 103 / 122
Regular Regular 152 / 153
Medium Medium 194 / 193
Bold SemiBold 225 / 221

Fira Code has no weight close to Thin, so Thin's ligatures are noticeably heavier than its text.

Outline adjustments

Ligature outlines are Fira Code's own, with two adjustments applied in fira_ligatures:

  • Italic slanting. In italic styles, ligature outlines are slanted about the math axis (the vertical midpoint of =) to match Roboto Mono's italic operators.
  • || height fitting. || is scaled vertically to match the height of Roboto Mono's |. Fira Code's taller bar would not match | in a | b vs a || b, and Windows would clip it at the bottom. The bars are vertical, so their stroke width is preserved.

Script and language systems

Ligaturizer registers calt under a fixed list of scripts and languages. In OpenType, an explicit language system does not inherit features from its script's default system, so registering extra language systems would hide Roboto Mono's smcp feature there.

The build rewrites the new calt lookups to use only the script and language systems already present in Roboto Mono's GSUB table, so small caps (smcp) continue working in every language.

Small caps

Roboto Mono's smcp (Small Capitals) feature is preserved across every script and language system that Roboto Mono supports, including the redrawn small capitals G and Q:

Regular: GQ aegiqr smcp: aegiqr