Serif Fonts for Coding
Sometimes I get sniped by Hacker News posts, and this one plunged me down a rabbit hole for coding fonts.
Many coding fonts are lightly stressed, monospaced sans serifs: in other words, each glyph takes the same width, and each glyph looks like a stick figure, with constant stroke width (a.k.a. stress) throughout the glyph.
But as the Internet stranger
uncanneyvalley
pointed out,
there’s decent overlap between “fonts good for coding” and “fonts good for
dyslexia”: being able to easily distinguish between visually-similar and
repeated characters.
Proportional (Equity):
Monospaced Sans Serif (Source Code Pro):
([{}]) l1i!|I OQo08 rumn ecoa pqdb -- __ == !! "' :; ,.
Monospaced Serif (Triplicate):
([{}]) l1i!|I OQo08 rumn ecoa pqdb -- __ == !! "' :; ,.
I think that stressed monospaced serif fonts (i.e. monospaced fonts with serifs that are curved instead of slab-like, and that are visually thinner than the rest of the glyph) are generally much better for coding than most default coding typefaces. It turns out there are very few such fonts: I’ve had to scour the Internet for them, but you can have the fruits of my labor for free!
- Libertinus Mono (Font Library, GitHub)
- Linux Libertine Mono (Wikipedia, Font Squirrel, Font Library)
- SimSun (Microsoft, Dafont Free)
- Sun Gallant Demi
- I can’t find any sources for it beyond this Unix StackExchange
post. Maybe if you have a Sun
computer?
¯\_(ツ)_/¯
- I can’t find any sources for it beyond this Unix StackExchange
post. Maybe if you have a Sun
computer?
- Triplicate (MB Type)
- Xanh Mono (Google Fonts, GitHub)