Blogged Pull Requests

Courier New Considered Harmful

Nov 14, 2024

Courier New is too thin. Any other system monospace font is more readable.

The related PR: fix: put all kinds of system monospace fonts before Courier New

There are multiple issues about Courier New being awful-looking on Linux:

Courier New is only readable under Windows because ClearType made a special case for it.

Therefore, it should never be one’s first choice for monospace font. It should be put at the end of the list.

By the way, though Courier New is a proprietary font, it is available on Linux through Microsoft’s Core Fonts for the Web. That’s why Linux users might see it.

In this PR I propose we set the monospace font stack to:

ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, Monaco, 'Cascadia Mono', Consolas, 'Liberation Mono', 'Noto Sans Mono', 'DejaVu Sans Mono', 'Roboto Mono', 'Courier New', monospace;

This puts all kinds of system monospace fonts before Courier New, with some personal preference.

I intentionally left out a few system monospace fonts:


As a reference:

GitHub’s default:

ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace

Tailwind 3.4.13:

ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

StackExchange’s design refresh in 2021: We are switching to system fonts on May 10, 2021 - Meta Stack Exchange

Some rights reserved
Except where otherwise noted, content on this page is licensed under a Creative Commons Attribution-ShareAlike 4.0 International license.