Hacker News new | past | comments | ask | show | jobs | submit login
Modern Mono (tbray.org)
296 points by zdw on Feb 13, 2023 | hide | past | favorite | 201 comments



I tried a couple Mono Fonts and found them all kinda samey.

I ended up seeing a post here for Berkeley Mono, a paid font, and I noticed in particular that it was incredibly readable compared to other mono fonts I was using, so much so that I've zoomed out one level on VS Code and iTerm and have similar readability as before.

It was the first font I paid for, and I was quite happy with it.

https://berkeleygraphics.com/typefaces/berkeley-mono/


I felt weird buying Berkeley but I’m very happy with it as well. I knew I liked it when I got the trial and yet I felt this aversion to paying for a font for several weeks. Then it dawned on me: I was depriving myself of enjoying someone’s hard work because I didn’t want to spend a fairly small amount of money for a thing I’d use for my work every day. Sort of an everyone loses situation. I can be bizarrely cheap, and it’s kind of embarrassing when I break it down. I lose time and money to my irrational cheapness.

Berkeley’s sharpness and legibility has been unmatched for me and I think that’s what draws me to it so much. I know others will say it’s not sharp or legible, and it’s a totally personal thing. We get good at reading on different screens with different characters, and we’re gradually trained to see in different ways. For me, Berkeley absolutely nails it.


I too have been following the Berkeley Mono font, and I think their website and promo materials are all very well designed. However, I tried the trial version of the font and found the kerning odd and unnatural seeming.


Concept of kerning doesn't make sense in monospaced fonts. You can't adjust side bearings and create kerning pairs.


I can relate to GP's feeling here. When I first installed Berkeley Mono and looked at some code in it, I had the same reaction: the spacing between characters looked inconsistent in some words. I think that some other monospace fonts do a better job of making the narrow characters ("i", "l", etc.) match the width of wider characters.

That said, I've been using it for a couple weeks now, and have stopped noticing that.

My main issue with it now is that some italic glyphs get cut off in my terminal, but I'm not sure if that's the font's fault or my terminal's fault.


Berkeley Mono has probably the widest "i" and "l" of any mono font. It appears to be wider than SF Mono. If anything, they are too wide.


You're correct. I had assumed it was the "i" and "l" that were giving the "something is off about this text" feeling, but I just opened up some sample text to try to figure out exactly which characters are doing it and can see that the "i" and "l" actually look fine to me.

It seems like the "r" is actually the main culprit. The spacing before and after "r" tends to feel too big to my eye.


I used the wrong term but you nailed it. The 'r' is definitely a problem for me too.

EDIT: Ok, I feel like this demonstrates the issue pretty well. The 'r' is a problem for sure, but notice how off balance the rest of the word looks? Evidently, there is no kerning (as I've learned) with monospace fonts, but then why does the spacing between these letters appear to variable to my eyes? The spacing between the 'om' looks weird too. This is just a screen shot from Font Book.

https://i.ibb.co/9bTNCYt/Y4q-VIvqa20230213.png


This is actually a problem with any font that has an 'r' without a base.

For example, Andale Mono: https://i.imgur.com/PeLZrj4.png

Fira Code and others do an ugly thing with 'r' that is a huge point of contention. There is a thread on Github that describes the frustration well: https://github.com/tonsky/FiraCode/issues/601

This is a fundamental trade off between aesthetics of the char itself vs. the aesthetics of spacing between chars. It comes down to personal preference and fits the "boring" description from Berkeley Mono marketing page.

Perhaps there should be an option for two types of 'r', one with a base and one without. That'd be great!


> This is actually a problem with any font that has an 'r' without a base. > > For example, Andale Mono: https://i.imgur.com/PeLZrj4.png

But in Berkeley Mono it'd be easily fixable: when the lowercase r's upperbar is a straight horizontal line (as it is in Berkeley but not in Andale Mono), you can simply make that horizontal bar a little tiny bit wider, which shall give the illusion things are more balanced.

I did create my own font with a 'r' like that (but I cannot share it as I stole inspiration from commercial fonts).


If you look at the word "proc" and "return" here [1], it looks great and extremely well balanced. There is also a problem of choosing specific examples like the word "random" which has a bad pairing with "ra". You're right though, it can be improved.

[1] https://cdn.berkeleygraphics.com/static/public-affairs/bulle...


You make it sound like I engineered this. "Random" was the first word that came to my mind because it was random. If you install the trial font, you'll notice this off balance look in a lot of the text you type, not just the example word I chose.


Even if monospace doesn't have "kerning" can't they create a "ligature" for "ra" instead? Doesn't have to be a weird hybrid symbol, just tweak the spacing so it looks right.


Unfortunately, it does not have Greek characters.


I keep glancing at Berkeley Mono's site since it popped up on HN recently when they added ligatures. As a Fira Code user for some time now the ligatures are a "must have" for me, so that helps a lot. Something about the overtly 70s Mainframe aesthetic doesn't quite hit for me (though very well crafted and almost), though I have to say what little is currently teased for their next font Houston Mono has me intrigued enough to sign up for their mailing list.


For what it's worth, you can add ligatures to any font you want. They just won't be the same exact style of the font.


Why? This whole article and almost are all the comments are on how many existing choices there are and "designer supports ligatures" is an easy enough filter to find a good, strong subset. I don't need it to be anything more than a filter of current options.


Because the whole ligatures for programming thing is relatively new. It was rarely the case that designers built them into the font.


Berkeley Mono is the best mono font out right now.


i've tried a ton of fonts but always end up going back to bitstream vera sans mono.


For my mono font, I converted the Atkinson Hyperlegible[0] font into mono, and have been using it as my terminal and editor font for over a year now. It's pretty janky, but it's surprisingly lasted longer than many of the other fonts I've tried over the years.

If you want to try it: https://github.com/Hylian/atkinson-monolegible

[0]: https://brailleinstitute.org/freefont


This is a nice overview. I don't share the author's intense distaste for serifs. In my search I ended up on Cascadia Code, which wasn't part of this comparison: https://github.com/microsoft/cascadia-code


Yes, this one is in the same top tier along with Fira, Hack, JetBrains, and Inconsolata.


Yes, I also settled in Cascadia Code around a year ago. Really nice!


Of his existing incumbent choice, Inconsolata, the author says:

> Unfortunately I am failing to find the words to explain why this pleases my eyes so much; a screenful of it makes me happy.

One theory about why would be that he has been looking at it day in and day out for years, and we tend to think that things we are more familiar with are more beautiful.

https://en.m.wikipedia.org/wiki/Mere-exposure_effect


This describes me. Every couple of years I read an article like this, download a handful of monospaced fonts, and try to use each one for at least an hour. Inevitably, every one of them has some little problem that rubs me the wrong way, and I go back to my old standby: Consolas, the dad jeans of programming fonts. I've been using it for 15 years, and I think I'm doomed to use it for the rest of my career.


Then there are people like me that will use the default font provided by the software they use. I have absolutely no idea what coding font I use (and it varies between IDE anyway).


Similar for me. Sometimes articles like this motivate me to find a new font. I spend some hours deciding on one and then use it. Until I wrote my device (I use windows, so once a year), lose the font, and don't even realize it. This repeats with the next article.


Have you tried Menlo? It's pretty great. It manages to make you look stylish without sacrificing comfort.


Yup, I think the best one https://imgur.com/a/5zPQ09F


However, I had the same reaction to Inconsolata the first time I saw it: "I have to have this".


Inconsolata is also my choice. It's like a monospace font with light serifs, and looks great on high res displays. Very pleasing. In my case, I knew that I liked it shortly after discovering it.


Is there some sort of organisation or society for people who just don't care about fonts? I think we need a secret handshake or a bumper sticker or something.


The secret “handshake” is just using Comic Sans for everything.


I use Comic Code for programming[1]. At some point I got bored of all the squarish typewriter-like fonts that makes code look boring and mechanical. Comic Code is fun and human.

1: https://tosche.net/fonts/comic-code


I used monofur[0] for the longest time, which is squarely in the category of quirky fonts, though definitely more regular than comic sans. It has basically no confusible characters in it at all which is a nice property.

[0] https://www.dafont.com/monofur.font


This looks really good!

Now I want a mono spaced Papyrus font.


This is actually surprisingly nice! :)


No, those people went out of their way to choose a font. They're not members.


Yes, they're called peasants.


oh I care, it's just that I think the ideal font is the one you're used to and so you should simply pick the OS default everywhere. Plus those fonts are pretty good anyway so why not.


> Uh, no, it smells of mainframes. Look at some of those 90° serifs, right out of the 1950’s.

maybe that's why I like IBM Plex Mono so much. My go-to font has always been DejaVu Sans and before that Bitstream Vera Sans, which are pretty much the same font. But I like IBM Plex after using it for awhile.

I'm not that anal about serifs or whatnot. But a font has to "feel" right with a page of code open. And the very minimum they have to get the O (letter "O") vs. 0 (number zero) right as well as I (letter "I") vs. 1 (number one). If you can't get that right then it's a useless coding font.



Comic Code (https://tosche.net/fonts/comic-code) is a bit more refined and better made imo. It is what I've been using for a few years now.


Everyone plugging their favorite font, but here's an easy way to compare them side-by-side to help you choose:

https://www.codingfont.com

(featured on HN: https://news.ycombinator.com/item?id=29010443)

Also this site to view a wide collection of programming fonts: https://www.programmingfonts.org


The problem with codingfont.com is that it overrides the line height, so you won't see what the line height will actually look like in your editor, which is something that I care about.


If your editor doesn't allow you to override the font's default line height (to whatever you like), there's a nice little tool you can use to do this to the font file itself: https://github.com/source-foundry/font-line

This is also useful for mixing and matching fonts. Nicolas Rougier uses this in NANO Emacs to hack the Victor Mono italic to have the same line height as Roboto Mono.


I think the point is that their editor does, but the website above for previewing doesn't. If you have to download and and edit the font file manually to get the website to preview it, you might as well just preview it in the editor instead.


Also, because people tend to be nitpicky about particular font features, such as:

- g with a curve or loop at the bottom?

- 0s barred, dotted or gasp nothing?

- $ with full-length bar or just top/bottom pins?

- etc

There are some fonts families out there that let you select just the right set for you, for example Input: https://input.djr.com/info/


I've been using the variable width Input for a while now and I've been really enjoying it. Main downside is poor APL coverage.


Another good comparison site:

https://devfonts.gafi.dev


Thanks for the send. I'm new to choosing a font for my editors, and just went through the tournament. I've got to say, Inconsolata is quite a finessed font for coding. It definitely seems to work well for me.

I do wish that site let you "exclude" certain options so they never appear in the tournament at all. It would have saved time, one or two are so awful they aren't work doing comparisons on.



It even includes Anka/Coder, my personal favorite. It doesn't include anything but Regular, not its variants like Narrow, but still quite a complete project.


Playing the font tournament is fun, especially with the font names turned off. I ended up with Fira Code (my current preference) vs Fira Mono in the final round.


Thanks for the codingfont.com

https://imgur.com/a/n6cKfRT


i love the tournament idea!

i downloaded my winner, installed it, changed my editor... and immediately went back to Monaco :) there's a lot of cognitive momentum to overcome in switching fonts.


I thought it would be silly or I would hate it, but the comic sans like nature of Fantasque Sans Mono really surprised me and worked well for coding/IDE use (especially in Python): https://github.com/belluzj/fantasque-sans


Yes, my favorite font for text editing. Not too unprofessional like comics-san but not dull/sterile like most mono fonts. Not sure why, but it has sort of an artistic personality, if I could describe it. Only thing I dislike is the "k" so I use the non-loop version.


Looks similar to Monaco (Mac OS’s default for monospace). The slight irregularities make it more comfortable to read vs more geometrical shapes.


This and Comic Code are my favorites, and Fantasque Sans Mono is free (unlike Comic Code).


I really don't get the current trend of font ligatures for things such as !=. It seems to me you loose the fundamental structure of the code. I get it looks good in screen shots on Twitter but when I tried a font with them it just seems to make me have to pause and think more.

What have others experience been?


Agree with you, tried it a couple of times and found it more distracting than anything. One gripe is seeing one character, hitting backspace and instead of removing one character, it changes to another character rather than deletes it ("≠" -> hitting backspace expecting "" but instead seeing "!" now).


I love ligatures. I find that well crafted ones make code look more coherent without detracting in any way from the structure (unlike proportional fonts which I abhor).

They're also very useful for languages which have operators which are easy to confuse, like the triple equal of PHP and JS (in which case having a ligature that's really distinct from the double equal is very convenient).


Monospace font on HN seems to do good enough, at least for me, or you think these are too similar as well?

    ==
vs

    ===
On my machine(s), the difference is quite obvious, with the space in-between each equal sign and all.


The difference is obvious when paired together next to each other like that, but the issue with code is often you are looking at examples (often with weary eyes) that are "miles apart" or the only one in a file and trying to spot the difference.

The ligatures that stack a third bar vertically across the space of three characters do jump out at you as much more meaningfully distinct in isolation. You don't have to just count width or whitespace, you have a third "clue" to work with, and sometimes that extra "clue" is incredibly important when you are tired and staring a bunch of code you expected to work and has a subtle bug and need to visually spot the subtle bug.


I love them and use them everywhere I can, mostly with JS/TS. I find the code displayed with ligatures more readable, and the only time I notice any overhead is when modifying === to !== or back, when I have to remember that I have to change only the initial character. Having => as arrows instead of `equals+more than` is enough of improvement, for me, that I keep using them, even without all other tiny tweaks that they give you.

I used to use "Fira Code", but then I've migrated to "JetBrains Mono" everywhere.


We wrote extensively about ligatures, pros and cons: https://berkeleygraphics.com/public-affairs/bulletins/BT-001...

Personally, I generally agree with you - ligatures add a layer of ambiguity. Toyed around with the idea of "precision ligatures", but it only works a subset of ligatures.

It's important to keep in mind that ligatures are at the presentation layer, i.e. when the glyphs are drawn. You can still copy and paste the text, underlying representation is still individual chars. Also, ligatures are optional, so why not; a lot of people love them.


Slightly off-topic, but why does your site not work in Russia? I'm currently in Russia visiting family, and need to turn a VPN on just for you, as anything else I use works perfectly fine. I sure hope it's not politics, because the last thing I need is fonts to be politically charged.


It seems like a little bit weird to have ligatures in a monospaced font. The whole reason ligatures exist is so that bits of letterforms in closely-spaced type don't crash. That shouldn't happen in a monospace font. If you're just changing the space so that two characters are grouped as a kind of unit, that to me defeats the purpose of using monospace to begin with.


The point of using monospace is to make things align. Ligatures don't defeat that.


I'm a big fan of ligatures and it is now a "must have" when choosing a coding font for me.

The "fundamental structure of the code" doesn't change, all those same mostly-ASCII code points are there unchanged. (Copy and paste still works. Source control works, obviously.) It's just a presentation thing.

There's also an argument (often used most especially by Functional Programming proponents and languages) that the "fundamental structure of the code" is actually the math behind the code and our mostly-ASCII assortment of programming language symbols are the easier-to-type/encode/transmit compromise of the mathematical fundamentals. From that perspective, ligatures are more "fundamental" by better expressing their mathematical underpinnings than the raw text that describes them.

> it just seems to make me have to pause and think more

A classic Python mantra is that "code is read far more often than it is written". If it might be a little slower to write, but it speeds up reading comprehension, that alone can be a major productivity win, per that mantra.

Of course, I think there's a familiarity thing at play here, too. Just like most things we learn, there's an early learning curve where it seems harder to work with something like ligatures because you are unfamiliar with them, but eventually you gain familiarity and are just as fast writing it as you were before.


Since an editor setup is very personal, it doesn't really matter if other people can't immediately recognize that the ligature is == or != . Personally I love ligatures and find that they help me to immediately grasp code structure since they are unique glyphs. Without them there is a slight delay when scanning things and your brain needs to do lookahead and lookbehind to be sure -> isn't just > or the ! in != isn't a random not.


'===' and '==' in JavaScript code were too similar. Maybe that's been addressed by different glyphs in other fonts, but that was enough to say no.


Fira Code and Cascadia Code add an entire third "bar" vertically to the triple equals. It may be subtle at first, but eventually it becomes a massively useful difference.


Yes!! I would so like to have a fontconfig option to just disable ligatures altogether, but afaik, one would have to enumerate ALL fonts that one would like to disable them for in the config file - and that's not feasible. So I mostly live with it, and shake my fist in helpless anger whenever somethings f_cks up my otherwise beautifully monospaced flow with this most damned misfeature of digital typesetting.


agree; I don't like it when my computer lies to me about what character is there, and ligatures are designed to do just that.


On the other hand, I hate when a programming language lies to me. Why have != when it should really be ≠?


because it isn't "≠", it's "!=". that's what the compiler accepts in most/all languages I know.

show me a keyboard made today that can enter that character directly. that character can't be entered directly because the USB-HID spec doesn't specify a keycode for that character.

I understand that some people want their computer programming languages to look like APL but we tried that, and it failed. Fortunately or unfortunately.


It's written "!=" due to physical limitations, yes, but it means "≠". That's why I want to see it that way.


I understand your point, I didn't make that clear.

!= and ≠ are merely visual representations of a concept, so I understand and agree that preference matters here.

the bytes in the file are the Unicode code points for "!" and "=", and that's what the compilers and parsers of the world care about, so that's what I want to see.

I don't want my text editor lying to me about the contents of the file. one could argue that showing ≠ does indeed tell you that "!=" is in the file. it will also appear if the Unicode code point "≠" is in the file. you may see the nice symbol you want to see, but the compiler or interpreter will not understand that and will show you an error which you may or may not immediately recognize as the wrong thing.

I want my text editor to show me what is actually present in the file.


I generally don't care, I don't find code easier or harder to read.

I do dislike when you go to delete a font ligature and it reverts back, as you expect to delete one character.


The ligatures are hipsterism and it needs to stop. I've never seen it happen in a professional setting.


I fell in love with Recursive (Casual Mono). To me, it's the perfect blend of slightly casual, slightly serif-ish, and not too skinny. https://recursive.design Screenshot: https://freeimage.host/i/HE6AFfV


As a traditionalist, I swear by good ol' X11 "fixed" (6x13) -- great density and legibility, with pretty much any glyph one would want.

https://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html


Yup. I emailed myself the string "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1" a couple decades ago just to make sure I didn't lose it. Not sure what I'll do when I finally get a HiDPI display. I think it's part of the reason I haven't made the jump yet.


Years ago I fell in love with Anonymous Pro. Everything seems to fit just right. I've never had an issue wondering which character is which nor have I run into missing common characters.

https://www.marksimonson.com/fonts/view/anonymous-pro


Wow, that’s a beautiful typeface. Thanks!


I switched to Iosevka for both iTerm and Emacs several years ago and have been pretty happy with the added horizontal density. My only real complaint is that Emacs behaves a bit weirdly when lines exceed the buffer width, but I haven't tried switching back to a "normal" typeface to confirm that it's Iosevka's fault.


I like ligatures, little quirks (relative to ordinary fonts) make output more interesting.

I wanted to get a portable monitor with a high hz rate for VR applications, and separately text test output. The best I could find, without spending too much on something that'll be better in the near future, is 16" 2560×1600. So not very high PPD. Anyone have any suggestions for a font that won't look grainy? I use it in portrait.


The last thing I want is for my text to look interesting. I want it to be boring and instantly recognizable. I want text editors showing it to work predictably. Two characters should show as two glyphs with the background showing through the middle. All glyphs should be the same width. Ligatures break these universal consistencies and stick out, screaming for attention. I want my text to be absolutely silent.


I find ligatures makes certain symbols instantly recognizable. Two characters, such as "=>" or "<-" look like math symbols, but then it takes one more step to realize no it's an arrow.


I recently started using a font that has ligatures - they don't break alignment of mono-spaced text, for example a two-character ligature takes up the space of two characters. I am not thrown by != showing up as an equals sign with a slash through it, because I can remember that this is in fact "!=". It's easier to read than the "raw" version. All in all I'm sold.


I can remember that the inequality symbol means != but I'd prefer the lower cognitive load of not having to recall anything at all.

I like that Typing "!=" results in "!=" being printed to the screen. I like that pressing backspace only affects the single preceding character/glyph instead of converting the ligature back into its constituent parts.

It's a consistency thing. I'm never reading math textbooks written with latex and all the fancy ligatures and symbols. I spend my entire day reading and writing code, so consistency there is paramount.


I prefer the lower cognitive load of not having to recall that != means ≠.


Weird; I see the former symbol all day every day and have no trouble recalling. I see the second symbol almost never, maybe once a month, definitely not as easy to recall.


That just goes to show how C has perverted mathematical notation.


I’m still enamored with Monaco after all this time. It’s fun and legible. It has bitmap and vector variants. Whenever I search for a new monospaced font, I always think: but it isn’t Monaco!


You can pry Monaco out of my cold, dead hands. It reminds me of the old "rock" or "t" font on Linux, which someone helped me re-find here: https://unix.stackexchange.com/questions/226593/where-can-i-....)

Unfortunately, I've tried using a version of Monaco on Windows, and whatever version I downloaded just doesn't... quite... render just right. So I stick with Droid Sans Mono on that _other_ OS.


I dislike most mono fonts, but I found a monospace version of Atkinson Hyperlegible a while back and was using it until the author made a new monospace font they call Unolexic[1]; I've been using it since. They also have done posts comparing different parts of different fonts[2], making quasi-monospace fonts[3], etc., which are fascinating to read.

1: http://thedarnedestthing.com/unolexic

2: http://thedarnedestthing.com/monolexic%20timeline

3: http://thedarnedestthing.com/quasimono


It's a beautiful typeface but I find it exceptionally hard to read on mobile at least, which doesn't bode well for terminal work.


I’ve stuck with Victor Mono for a while now, since I like having comments in cursive. I know that’s not for everyone. I just seem to parse prose a little easier with joined up letters.

https://rubjo.github.io/victor-mono/


Our terminals in college were configured with monofur, and it's whimsical nature is something I've always been partial to:

https://www.dafont.com/monofur.font


Looking at the screenshots, to me the fonts with the stronger and more defined lines seem slightly better than others:

  - Go Mono
  - JetBrains Mono
  - MesloLGS NF
In comparison, there are some that are clearly harder to read:

  - Iosevka Term
  - Inconsolata Light
I actually commented on the fonts that I use (Liberation Mono for readability and PT Mono for stylistic preferences) a while ago, with my own example images, but I'll also agree with the statement that most modern fonts look a bit samey: https://news.ycombinator.com/item?id=34588312

However, I can't help but to wonder how exactly one would measure how light or heavy a font is, when compared against other fonts. Maybe some measurement of how much contrast there is to the edges of the strokes (e.g. the font doesn't appear blurry and is readable, given a certain quality of eyesight, at a particular size and distance), or just how much of the image is made up by dark tones, or how clear the strokes are?

Comparing the histograms seems borderline useless, for example, even between Go Mono and Inconsolata Light the differences are very slight: https://imgur.com/a/BWbzJzj


> - Iosevka Term

Iosevka comes with about a million different variations (and you can build custom variations by building the font from source). From the screenshot, it looks like the author was using the light weight; I almost always use medium. Similarly, if you don't like serifs, you can turn them off; I use the "hooky" variant which adds loopy tails to some letters.


I've completely fallen for Cascadia Code - https://github.com/microsoft/cascadia-code - which I think deserves a mention.


I like old mono. I was reading Guy Steele's Common Lisp book and loved the font so much I looked it up. Turns out it's called Letter Gothic Standard, and it looks awesome in code: https://www.wfonts.com/font/letter-gothic-std


Wow, this typeface is delightful. Thanks.


JetBrains Mono is my choice. I tried switching between a bunch of them and always came back to it. They've done a great job.


It looks good, and is surprisingly readable when shrunk down a bunch. It's a fantastic quick-setup font. I only don't use it as my main font anymore because I have a very personalized Iosevka build. But that takes time and motivation to do (and a mind-blowing amount of RAM).


Just pay the man for PragmataPro[1] and turn off anti-aliasing in Emacs and iTerm. The font is legible and beautiful at every size on any screen.

[1]: https://fsd.it/shop/fonts/pragmatapro/


I'm a big fan of this font, I use it every day and have never regretted the purchase. Unfortunately the OP noted they didn't like Iosevka, which I think is pretty visually similar.


Pragmata Pro is a huge influence on Iosevka, the author has admitted it. What makes Pragmata Pro work, afaict (since I've yet to actually buy the damned thing), is it is insanely well hinted... this is the one thing Iosevka will never have (it depends on ttfautohint, which although acceptable, will never be good as a talented font hinter producing his art).

Having tried, and evaluated, basically every mono font in existence worth using here, I may end up just buying Pragmata Pro.

My current daily driver is Input, and not set as a compressed or condensed style. Input is only hinted for the weights Light, Regular, Medium, and Bold, for normal width; the other three more narrow widths are not hinted at any weight. At the sizes I prefer text, Input requires the hinting supplied by the author.


I love PragmataPro. It's not just the look, but also the character support and many of its design features. I work with linguists in academia and get to work on a lot of plain text data - transcriptions and what not. PragmataPro's IPA support is something I make use of every, single day, not just for coding. If I had to pick a single font to use for anything and everything for the rest of my life, this would be it - including reading.


I finally bought it a month ago after years of "trial". It's an expense that student me would never had approved, but now I'm glad to give back because the font makes me so happy.


Oh boy time for this again:

> To all the people complaining about how they don't like ligatures:

> Nobody cares. If you don't like them, then don't use them. They are optional.

> Lots of people like them. Let people like things.

https://news.ycombinator.com/item?id=34589338


Why would he miss the best of all? DejaVu Sans Mono. This font is the only thing I come back to decade after decade. There's too much good to say about it.


I'm a big fan of Lilex and use it currently: https://github.com/mishamyrt/Lilex. I think it looks quite a bit like Inconsolata which I used to use a long time ago.


Andale Mono since 1993 -- it's on your Mac, and in Windows "Core Fonts for the Web", try it:

https://en.wikipedia.org/wiki/Andalé_Mono

Author criteria was free. This has been free, and even without MacOS, can still be legally gotten free:

https://en.wikipedia.org/wiki/Core_fonts_for_the_Web

// Lucida Console is not the same.


Anyone know of a similar comparison of screenshots using subpixel-AA instead of "monoscale"? (it's not really "grayscale" as the color used is not gray).

I know OS X dropped subpixel-AA but, to me, the only criticism about subpixel-AA is long gone: on monitors with low DPI it could make letters a bit blurry in some kind of a psychedelic way.

But now all monitors have higher DPI and I'm devv'ing on Linux only, which does support subpixel AA, and I turn subpixel-AA on where I can. If anything it makes rendering less blurry.


Answering my own question, user "cornellion" posted in this HN thread a link to a site which uses your system to actually render the fonts in order to compare them, as opposed to screenshots, so as my system uses subpixel-AA I can see what they're going to actually look like on my system:

https://devfonts.gafi.dev/


I used Envy Code R for a long time and switched to Iosevka a few years back. Most mono fonts feel too spread out. (From the looks of the fonts, most folks probably feel the opposite of me...)


Love Envy Code R.


If you had asked me 1 year ago whether I would pay $75 for a coding font I would have laughed at you. And yet, here we are, my font of choice is Berkeley Mono any day, everyday.


The screenshots look really poorly compressed and noisy, not great for comparing fonts.


You can click them to get the full version.


I'm aware of that thanks.

The images have been scaled, to varying degrees. It makes them basically useless for comparing fonts.

You can see obvious signs of this by comparing the below two screenshots, the macOS window UI elements are different sizes.

https://www.tbray.org/ongoing/When/202x/2023/02/09/-big/inco...

https://www.tbray.org/ongoing/When/202x/2023/02/09/-big/droi...


> I got a huge number of suggestions, of which I downloaded 16, basically all the ones that are free. In general I prefer to pay for things and am suspicious of anything that’s free on the Net, but when there are so many good free options I just don’t think there’s a business model.

This sentiment is quite odd; given that who would ever pay for a font? I get being suspicious of "free" but if you use Google, or have a gmail account. Heck even Mastodon is a free software package.

I see this a lot with older development communities; even though I've been writing code for many years; while working on an old application I was met with a prompt to purchase a license to use a library. It took me aback because while I've heard about buying and selling libraries, I've never (ever) ran into it before working at my current job. It's odd, and thankfully a dying way of making money since every dev license is at minimum $500 for a year; to $5000 annually to use those libraries in production, not even just the time to develop with them.

Never buy a font please


You’re glad it’s a dying way to make money but I remember developing and selling software tools and libraries was fulfilling and a lot of fun. Definitely beats writing hundreds of yaml configuration for open source libraries and fishing for thumbs up in GitHub issues so they get more attention :)


I tried Scientifica as a joke, and have ended up using it both in the terminal and editor: https://github.com/nerdypepper/scientifica

The blockiness just works for me. Reminds me of old DOS fonts. Coworkers hate looking at my screen though.


I have switched to Operator Mono about 10 years ago. This font is not free though. However it was the only font (at the time I was looking at at least) that had a monospaced italic version which I found looked slick. So I ended up buying that font and used it ever since.


operator mono has always been my goto since i first went into a deep dive on this topic, and i LOVE it. in the interest of full disclosure, i... torrented it... many, many years ago, but now that i'm thinking about it i will go buy a copy-- i definitely owe them at this point. highly, highly recommend operator mono-- i just feel like if you are optimizing for pure aesthetics it wins out. the italic version is definitely a big part of that.


Seeing as everybody's using this space to plug their favourite font, and the one I use hasn't been mentioned yet: I'm partial to Generic Mono II (http://luc.devroye.org/fonts-75172.html & https://github.com/organicplanning/hackedfonts). It has slashed zeroes and, with a reduced character spacing, just looks nice and otherwise doesn't distract from what I'm doing. Though it's coverage outside of the Latin character set leaves a bit more to be desired.


Tossing this one in here as it's a combination of Isoveska & PragmataPro: https://github.com/shytikov/pragmasevka

Been using it for a bit and I've really fallen in love with it.


I thought this was going to be about C#. I was a little disappointed that it was about fonts, heh.


I'm currently using Menlo in VS Code (on Mac) since SF Mono is too restrictive for my needs. I like Fira Code but the ligatures, while very nice, would be confusing for my students and probably best not used.



Few more fonts that lesser known, but worth to take a look imo - Basically a Mono https://experi.mentallydesigned.com/type/bam/ - Messina Sans https://www.luzi-type.ch/messina-sans - PP Fraktion Mono https://experi.mentallydesigned.com/type/bam/


The font rendering engine affects the font appearance significantly. Fonts that look good on macOS don't necessarily look as good on Linux or Windows and visa versa. There are also fonts designed specifically for macOS, Linux or Windows. For example, the rendering of Iosevka Term on macOS looks quite bad, but on Linux it's rendered very well both in 96 dpi and hidpi. So there are no "best" fonts. You have to try them all and decide for yourself which one looks the best.


I swear by Comic Sans Mono: https://dtinth.github.io/comic-mono-font/

Reminds me not to take life too seriously ;)


And now for the comparison on 96(-ish) PPI screens…! I find that many more recent fonts simply do not look good on those. Some are even outright terrible, glitching all over the place with subpixel rendering.


Like the author, I always thought IBM's Plex Mono had a bit too much character for a UI font, but I’m a big fan of IA's modifications: https://github.com/iaolo/iA-Fonts/tree/master/iA%20Writer%20...

Part of the project are some interesting duospace and quad-space versions that I probably wouldn’t use for code, but are great for editing general text.


Shame he apparently only tries one of the very light weights of Iosevka. I love my Iosevka Slab. The “light” weight works great on retina displays imho.


Go Mono is a favorite of mine. The serifs give more of a book feel than most monospace fonts. Each character is also quite visually distinct.


> I’ve just finished setting up a new Mac (14" MBP, M2 Pro, 32G, 4T)

I am curious what processor, RAM or storage size have anything to do with this article.


It isn't important to the article but whenever someone writes an article about doing something new/different because "I got a new computer" the first comment is always "what computer did you get?"

I guess the author knows this and so pre-empted the question and decided to just answer it before anyone asks (although someone will no doubt still ask).


Not sure the obvious needs to be stated, but it feels totally up to the author to add any detail they like. And perhaps frequent readers are interested in the tools the author uses besides their programming font?


last year I made a custom build of Iosevka using the customizer on the website and building it on my machine, and I can't use any other font now. If you like the general look of Iosevka, but prefer certain glyph variants over others - highly recommended to look into creating a custom iosevka build for yourself


The tournament thing is kinda fun, but deep down I think we know which we like best.

For me, it's serif fonts

1. Triplicate A Code

2. NSimSun

3. Courier Prime

Sans serif fonts certainly have their own appeal

1. The Sans Mono (the O'Reilly book font) / Fira

2. APL385 Unicode (this font's got maybe the best numbers)

3. Mononoki

Pixel fonts, classics (but maybe best on low DPI)

1. Fixedsys Excelsior 3.01

2. 6x13


In my experience on every setup: different OS version, different screen, etc. the rendering of fonts gives slightly different results, to the point, I just choose whatever works best at a given moment, and don't get too attached to it.


i've been using dejavu sans mono for... so long that whenever i see other fonts i get weird out.

i totally get people that don't like it, but fonts are so personal that i don't really care.


Iosevka has a large number of variations, weights, widths and styles.

He just cherry-picked one and decided he didn't like it.

Based on his preferences, he should try Iosevka Term SS10 Extended instead.


Whenever I‘m trying a different font, it doesn’t last for long. Not only does Iosevka support all kind of variations (as in: there’s a style for everyone), it‘s also very narrow. I always find it odd when looking at different fonts taking up 1.5 times the horizontal space, especially in terminals.

I‘m using a mixture of SS10 and SS05.


The Extended width is not narrow.


If you are willing to entertain non free options: MonoLisa is a pretty good font and you can customize which ligatures you are willing to entertain. (I’m basically at zero)



Ugly as sin but works on everything everywhere. Truly a font built for a war zone.


It's weird to see the author talk about "information density" with monospace fonts. Am I missing something, maybe misinterpreting what he means by it?


I'd wager the context in which it is used gives a clue:

> More compact than this overview’s average but so graceful that I’ll take that and welcome the information density.

My guess is they mean how wide or narrow one character is in a given monospace font.


Yeah, that was my best guess too: visual density

"Information density" normally means "how much information can fit in a piece of the screen", which is going to be the same for all monospace fonts (at the same font size, anyway)


I did a similar comparison for all the mentioned fonts, but optimized more for the legibility of source code. I ended up selecting Source Code Pro.


I've been using JetBrains Mono NL for some time, but after reading the article I want to give Hack a shot, since it's more vertically compact.


If you're on MacOS, SF Mono is available out-of-the-box pretty sure. I use it in Terminal.app and text editors (mostly Nova.app) and it looks great.


I swear by "Monaco Nerd Mono"

It was a revelation to discover "Monaco" when I first got started on the mac. So casual yet stylish and refined.


I don't know why this gets me so hot but you really don't need to be using a monospaced font for code anymore. Monospaced fonts are an abomination created because it made programming early terminals easier, we've long since outgrown our use for them and yet they are entrenched in programming culture because we still use terminal emulators based on those same standards to this day. Give your eyes a rest and look at your code in a variable width font. I've been using Avenir for years and it is so nice.


A buddy of mine uses Lucida Grande as his programming font and it makes me cry every time I see it.


Came here to say this. I didn't like any available variable width font for coding though so I created my own based on helvetica.

https://github.com/exebook/variable


What about alignment? The space character is much narrower in most fonts, making code have a terrible rythm.


The key to using a proportional font is to give up alignment completely, and only use indentation.

Once you do that, it no longer matters whether you use a proportional or monospaced font.

The Black formatter for Python is an interesting example. It strictly uses indentation only and never uses alignment.

As a result, Black-formatted code is equally readable in any font, monospaced or proportional. I use my own customized proportional font called Trebuchet++, and Black code looks great in it.

If you didn't know I was using a proportional font, you might not even notice that it wasn't monospaced.

As you may guess, Trebuchet++ started out as Trebuchet MS, which I found I really enjoy reading on a high-DPI display. Then I started tweaking things in FontForge:

Trebuchet MS has a terrible tilde character that looks too much like a minus sign. So I put in a better defined glyph for that.

One problem in a proportional font if you use names_with_underscores as required by too many coding standards: the underscore character is much too wide compared to a period. This gives a visual grouping that is the opposite of what you want, for example in foo_bar.moo_car(), "bar" and "moo" are closer together than "foo" and "bar" or "moo" and "car". This is misleading visually.

So I used FontForge to add a bit of space on each side of the dot, and add negative space on each side of the underscore. In the example above, this pulls the "foo" and "bar" in "foo_bar" closer to each other, and similary for "moo_car". At the same time, it adds some separation between "bar" and "moo".

The difference is subtle, but in terms of visual grouping it avoids having the code read like this:

  foo  bar moo  car
So it reads more like this:

  foo bar  moo car
I have a couple of other tweaks I haven't gotten to yet. In particular I want to add a bit of margin on the inside of parentheses and square brackets. In my own code where I get to choose the style, I've always uses a space inside those. I find this offers a real improvement in readability. But if I can't do that, at least I can fix it with some font tweaks!


I've found I don't miss the ability to carefully align stuff outside of the initial indentation. I actually use a slightly modified Avenir that prints a wider space if it's the first thing in a line, making the indentation stand out more. The rhythm of a general line of code I think is improved because it reads like regular text.


That's where the nonexistent support for variable-width tabulation (or flexible tabstops) comes in! Unfortunately even the newer programming editors don't match these type of Word-level basics


That's what tabs are for.


Are there any variable width fonts with ligatures? While a bit of a debate on their usefulness, I quite enjoy fonts with them. In addition, how well does block-editing work with variable width fonts? I don't do it too often, but it does massively speed up my workflow when I have to.


He said he uses Emacs


I like iA Writer Duospace. It is not a strictly monospaced font, but imo the additional half width really makes m/w much more readable.


It's such a great font. I've been through them all, and even hacked together my own custom version of Office Code Pro, and while I switch every now and then, the iA Writer fonts are my favourites. I pair them with the Quatro version for code comments.


Andale Mono - one for the ages. Tried a lot of others and always come back to it. How can anyone use anything else is beyond me ;-)


I use Fira Code wherever I can (have done so for years) and Inter as a system font. I find the combination extremely readable.


You really have to use a font for a few days before you can judge it.

I personally use Iosevka, but it took some time to get used to.


It's not mentioned in TFA, but I really love "Monofur".

DAE know of a more complete lookalike with more glyphs?


That's a nice font. Thanks for the link. And thankfully, I hate glyphs.


Monofur has been my goto text font for a long time.


I wish the article mentioned Fira Mono, which is the same as Fira Code but without the ligatures.


TFA looks for the perfect monospaced font in the Mac OS terminal, long article


In the Emacs screenshots, I am curious what "Combined ⤿" means.


Obligatory mention of Mensch - https://robey.lag.net/2010/06/21/mensch-font.html

Don't know if it counts as "modern" being 13 years old, but it's the best there is.


Consolas is the old best. Cascadia Code is the new best.


Monaco until the day I die.


Iosevka is glorious.


6x13 or gtfo


Wow screenshots of text rendered on a notoriously bad text renderer, then downscaled and posted in a blog. A text-based description of the fonts might be worse, but only barely.

Yeah, man, so much effort and every screenshot looks identical in context in the blog post.

Iosevka and Iosevka-Comfy for the win.


Click on the images to embiggen.


You probably meant 'enlarge'. "Embiggen" was made up by the simpsons as a joke.


It's a perfectly cromulent word.


All words in use today were made up at some point and then accepted through popular use. Merriam-Webster accepted this one into their dictionary some years ago.[1]

And Dictionary.com acknowledges it may have been published previously in 1884 by C.A. Ward as an example of a barbarous verb.[2][3]

[1] https://www.merriam-webster.com/dictionary/embiggen

[2] https://www.dictionary.com/browse/embiggen

[3] https://academic.oup.com/nq/article-abstract/s6-X/242/135/43...


You understood the meaning well enough, which is the purpose of a word. Perhaps you need to embiggen your perspective.


Anyone can embiggen me any time they want.


In the same episode as that other word - amazing


Me fail English? That's unpossible!


I tried Iosevka but it felt too much like the bitmap ROM fonts on old computers and terminals. All those fonts were a little too pixel-dense.


That may be why it -- and Envy Code R -- are the only "modern" monospace fonts I can stand for very long. Everything else just looks like IBM Letter Gothic, or some other typewriter vendor's substitute for Letter Gothic. Hence why I use bitmap or bitmap-like fonts for terminals.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: