Monospace programming fonts for code editors
Open-license fixed-width families for terminals and code editors, with clear zeros, several weights and, for most, italic styles.
const x = 0;
You stare at a code font all day, so small details matter more than they would anywhere else. Start with the characters that must never be mixed up. Zero next to capital O, the digit one next to lowercase l and capital I, round brackets next to curly braces: at 12 or 13 pixels each of these should be impossible to misread. That is why so many coding fonts put a dot or a slash inside the zero.
Next comes texture and range. Every glyph has to fill the same width, so slim letters like i and l get long serifs or tails to occupy their cell, and the way each designer solves this sets the font’s overall feel. Syntax highlighting needs at least a regular and a bold, and a real italic is handy for comments. On high-density screens the light weights usually look better, on older monitors the heavier ones. Some fonts include programming ligatures, which join sequences such as an arrow into a single symbol. Some people love them and some do not, and editors let you turn them off. Finally, check the width, because a narrower font fits more columns into a split pane.
-
JetBrains Mono
Built for writing and reading code, with a tailed l, serifs on the capital I and a marked zero; eight weights plus italics.
-
Roboto Mono
Its punctuation is adjusted for source code, across seven weights that each have an italic.
-
Inconsolata
Originally made for code printed on paper, it has a slashed zero; today it varies in width and weight, with no italics.
-
IBM Plex Mono
Feet like slabs on i, l and r, plus a marked zero, stop similar characters from blending; seven weights plus italics and Cyrillic.
-
Source Code Pro
Partner for coding to a sans made for interfaces; variable between ExtraLight and Black, with italics.
-
Fira Code
Programming ligatures turn frequent operator sequences, arrows among them, into one symbol each.
-
Geist Mono
Look-alikes are kept apart by a curved foot on the l, a flat base on the i and a slashed zero; nine weights plus italics, with Cyrillic.
-
Cascadia Code
Beyond Latin it covers Greek, Cyrillic, Hebrew and Arabic; six weights, each with an italic.
-
DM Mono
Three weights with italics, a tailed l and a slashed zero; the heaviest weight is Medium, so highlighting gets no real bold.
-
Ubuntu Mono
Made for code and terminals in Regular and Bold, both with true italics.
-
Anonymous Pro
A set of four fonts made for programming, in which 0, O, 1, l and I are clearly distinct.
-
Atkinson Hyperlegible Mono
In seven weights plus italics, drawn to make 0, O, 1, l and I easy to distinguish.
Samples load a basic Latin subset of each family. Every family here carries an open license; its page states the terms and offers the original files.
Questions about monospace programming fonts for code editors
Do any of these coding fonts include programming ligatures?
A note mentions ligatures only when the font’s record lists them. If you would rather see plain characters, most editors have an option to turn font ligatures off.
What are the steps to install a coding font in my editor?
Download the family and install its files in your operating system. Then type the family name into the font setting of your editor or terminal, and restart the app if it does not pick the name up straight away.
Can I show these fonts in a paid course or ship them in a commercial product?
Yes. Their open licenses allow commercial use, which covers screenshots, videos and embedding in software. Each font page names its license.
Should I set body text in a monospace font?
It is fine for a short passage but not for long reading, because equal widths make words harder to tell apart. Pair the monospace with a proportional family for prose.