I think I switched to this font a couple of years ago and I've been unable to find anything that even comes close! At this point I would consider JetBrains Mono to be my forever font.
I keep trying to switch away from Ubuntu Mono, but I always end up switching back after a few days. I just played "the font game" and Source Code Pro won for me, today (But my top contenders were pretty much what I expected: Fira, Ubuntu, Source Code Pro). So, maybe I'll give SCP another few days and see what happens.
I would argue, that a more narrow font gives you more bang for the buck in terms of information per area of foveal vision. Even if something looks aesthetically more pleasing, if it serves is purpose better, you'll get used to everything else.
My history is: Monoid -> Iosevka SS05 -> Essential PragmataPro
I just compared the latter two to JetBrains Mono, and at least on my settings, doing a blink comparison, they both look more clear to me.
> Ligatures in programming fonts are a terrible idea.
> And not because I’m a purist or a grump. (Some days, but not today.) Programming code has special semantic considerations. Ligatures in programming fonts are likely to either misrepresent the meaning of the code, or cause miscues among readers. So in the end, even if they’re cute, the risk of error isn’t worth it.
For me it depends on what’s being written. For the stuff I work with day to day (all very “boring”/mainstream languages) there’s no possibility of ligatures causing confusion, and I find them to be an enhancement in both aesthetics and readability.
I also think it would be interesting if a programming language used the Unicode characters that ligatures simulate rather than combinations of general purpose characters, but that seems unlikely given that it’d require a new programmer-oriented keyboard layout.
I find ligatures increase the difficulty of communicating/collaborating with other developers. When working through a problem together in a screenshare, or at their machine, having to visually parse what they're displaying creates a speedbump in my head as I have to pause and translate. Some ligatures are not too bad, easily discernible, but some are particularly egregious.
The worst offenders tend to be anything involving '!' and '=' and the many varying stylistic interpretations of it. It appears that font designers are in a race to outdo each other, or introduce it for the 'coolness' factor and eschewing the practicalities involved.
But I don't want to be a grump and I do keep trying out ligature fonts every now and again, always with negative results.
"Is this a ligature or is it a homoglyph attack" is certainly a waste of cycles that nobody should have to endure. (why am I thinking of Scala all of a sudden, Scala has done nothing wrong!)
Perhaps if some radical homoglyph defenses get established they could also take this sting out of ligatures? (how about highlighting everything that cannot be typed with your current keyboard layout, or with the layouts in whatever quick access scheme you might have?)
Hmm. Yeah, I really don't think I like != ligature. I don't want to mistake it for some non-ascii unicode symbol, and I generally like what I type to stay the way I typed it (including curly quotes!).
Yeah, no thank you.
Also, I notice that Jetbrains Mono doesn't ligature ~= as !=, but that is what it means in Matlab. So it really seems like assumptions about language semantics is baked in to the font.
Jetbrains Mono does offer the no-ligature version.
It's a very common logic operator across a multitude of languages. In what situation do you have that sequence of characters that isn't a logic operator?
Using Haskell is one such situation. Haskell's inequality operator is /= which someone could expect when they see ≠. Some people redefine != as a custom operator (see link), which can bring even more confusion with this ligatures.
I might be imagining this but I think that I have seen ligatures on/off being used as a deliberate hint to convey the difference between read-only and editable code. That's a very nice tweak. InteliJ at least can be configured that way, might be a case where its Android Studio incarnation has different defaults.
> There are a lot of ways for a given sequence of characters, like !=, to end up in a source file. Depending on context, it doesn’t always mean the same thing.
While this is true, it doesn't seem to come up that often in practice. I'd say this appears when I'm viewing log files or something that isn't a programming language.
I thought it was weird at first, but I grew to really enjoy the way they look. It isn't too difficult to figure out, because even if you don't use ligatures when you look at one you know right away it is an unusual symbol and you need to look at it a little closer to figure out what it is.
Also, if something doesn't turn red when you swap an = for a == then it's time to re-evaluate code coverage.
Edit: I should note that I mainly write C and C++. Other languages may make ligatures less pleasant
If you think "→" misrepresents the meaning of "->", then certainly "->" also misrepresents the meaning of a semantic arrow "→". The set of symbols in 7-bit ASCII is somewhat arbitrary after all.
Let's say "→" misrepresents the meaning of "->" even as much as 0.1% of the time. Would you rather your risk of error be 99.9%, or 0.1%?
I'm sick of anti-ligature people telling everyone else not to enjoy their fonts, on every single post about a font. Ligatures have caught on for a reason.
The only thing that is annoying with -> as two characters is the misalignment of the horizontal center. If the ligature had always centered the - to the middle of the >, I’m not sure so many people would be pushing towards having a single arrow.
Screenshots are a suboptimal way to share code in general, and should be avoided. If you are trying to copy code from a screenshot something has gone horribly wrong in your process. If you are having trouble reading ligatures, that may be a learning curve issue you can adapt to with more use. (Arguably, most ligatures should be obvious with enough familiarity with the programming language without needing to look them up or learn them.)
Most other ways of code sharing you just copy and paste into a non-ligature font if you need to.
Aside: "ASCII" symbols are neither universally shaped or styled either. The easiest and obvious example to mind is the plain 0, dotted 0, slashed 0 choice and confusion with nearby symbols such as O and o and θ (Theta, not far away in "Extended ASCII"). Similarly all the variations of lower-case L (versus 1 and i). Those choices vary considerably between fonts and are another huge reason some people prefer certain monospace fonts over others and the debate over "best" will likely be an ever ongoing one. You may not think these issues compare to ligature use, but it's exactly the same sort of style debates.
If you say it is a "terrible idea" that kind of implies that anyone who has the idea to add them to their font or use a font that supports it has made a terrible choice. At least, that's how I interpret it.
Ligatures caught on because users like 'clean' designs where 'clean' means 'the removal of affordances which are not needed by frequent users but are useful to new users'. Your example doesn't make any sense because while the dash arrow attempts to mimic an actual arrow it's not ambiguous that it's two characters and will be understood by a compiler as such. A reading of source code either on a blog or shoulder surfing with this font does have that ambiguity, which is the problem.
I don't think "→" necessarily misrepresents the meaning of "->" (though see the objections throughout the thread re: differing ways that languages notate "not equal to.")
The point is that programming isn't just an exercise in semantics. But it is deterministic symbolically.
This gives me the same vibe as "Why get rid of the DVD drive?".
I've used ligatures now for several years (with JetBrains Mono in particular for some time). I've done lots of pair programming and a common immediate reaction is "How can I get those too?! It makes it so nice to read and understand".
Instead of throwing them out because of some edge cases, why not improve the software for the edge cases?
Yes, there are some problems, like a double arrow to the left `<=` which is not the same as a 'less than or equal' or, to a lesser extend, 'less than -1', which can be written as `a<-1`, which is no arrow `a <- 1`.
Functional considerations aside, there's definitely some personal issues with ligatures. Spacing in code is incredibly important for a lot of people. I'm dyslexic, so distinguishing between something like someValue=someOtherValue() and someValue->someOtherValue() adds additional unnecessary complexity compared to simply writing assignments with spacing (ie, someValue = someOtherValue()). This makes it significantly easier for me to interpret it at a glance.
That leads into my personal issue with ligatures: they change what should be a binary operation into a more complex one. Instead of "I see equals signs, one space or two?" it becomes "I need to stop, change to a vertical reading direction, and see if that's 2 or 3 lines" or "I need to estimate if that is 2 or 3 characters worth of width, or get off track comparing it to characters on the line above." Comparison operators should simply be "greater space equals" but become "wait, was there a second line there? I have to go back and double check that."
I'm sure someone will come along and say "how is reading the number of spaces different than reading the number of lines?" It might be that the spacing is normalized without ligatures, it might just be the vertical spacing in ligatures is too small, I don't really know. It's incredibly difficult to convey this to someone who doesn't experience it, all I can say is it is a night and day difference to me.
I've given Fira Code a shot 2 or 3 times but have found the ligatures to hinder my productivity every time. I also tried them just in the "reader mode" with Jetbrains Mono when that feature was first released, but had to turn it off after a few days.
That all being said, I won't fault anyone for using them if it helps them in the same way that not using them helps me. I'm just glad they can be disabled in Jetbrains Mono as it is otherwise an incredible font.
Interesting. A friend of mine is dyslexic and has expressed a strong preference for ligatured fonts for programming for the opposite reason. I guess the lesson is to leave people alone with their preferences...
I make less errors and find errors more readily with ligatures on. The instant I saw them on my coworker's machine, I had installed Fira and enabled ligatures in Jetbrains. I have ADHD and I'm a highly visual person. I love ligatures, emojis, and any CLI tool that "makes my terminal look like a disco" (to quote a different coworker).
I'm sure it's a highly personal thing, but Matthew Butterick proclaims it's more universally bad than it actually is.
That is why there's a checkbox for enabling ligatures.
Like why is this a thing? It's like proclaiming certain font sizes aren't worth it. My dev machine is my interface. I should be able to do what I like with it.
Edit: I guess he addresses this in a footnote, but hardly:
> “What do you mean, it’s not a matter of taste? I like using ligatures when I code.” Great! In so many ways, I don’t care what you do in private. Although I predict you will eventually burn yourself on this hot mess, my main concern is typography that faces other human beings.
A) I've never burned myself b) other than screen shares (again, nary a complaint, but several "cool! How do I get that?") I'm never rendering code for others to consume. I agree that a ligatured font would be bad e.g. for publishing code in a whitepaper.
Ah, yes, my preference for how a couple of bytes of data in my text file end up getting mapped to a few dozen more bytes of data on my screen. That. That was the moment things went to far.
I've witnessed curly quotes finding its way into html due to copy paste causing at least an hour of debugging.
So I can imagine when there are tools to prettify code for blogs this can become an issue for some languages.
While not entirely related to ligatures, my own biggest offender has been strange whitespace being treated as an identifier in LuaJIT. Mostly caused by my Norwegian keyboard layout producing strange whitespace when you want to write the not operator "~=" if you're not careful enough.
You can blame many parts here, LuaJIT for allowing this in the first place, editors lacking tools to deal with it or normalize pasted code, me for not using a us layout, me copy pasting code, or me not being careful enough.
Thankfully vscode will now highlight non standard whitespace with a yellow box. And best of all I've learned to be aware of these things when copy pasting code from the browser.
I'm the most whiny opinionated person on the planet and even I find this stupid. Why would you care about what code looks like on other people's screens? If it works for them, it works for them. Christ. I hate this industry sometimes. There are serious problems and then there's people writing argument bait about ligatures.
Thank you. This guy is the equivalent of Richard in Silicon Valley when he tries to take the stairs three steps at a time to demonstrate how tabs are superior to spaces.
He explicitly doesn't care what code looks like on other people's screens, as long as it stays there:
> I don’t care what you do in private. Although I predict you will eventually burn yourself on this hot mess, my main concern is typography that faces other human beings. So if you’re preparing your code for others to read—whether on screen or on paper—skip the ligatures.
Surely the readers are reading the code in the font of their choosing. If they get miscued by ligatures, that's squarely on them, because they're the ones that chose to read it in a ligature font. That's the beauty of fonts - they can be very personal.
I tend to agree not because I think they often get the semantics wrong, but because it's an unnecessary translation operation my brain has to do. Why does my brain need to process two different ways of representing the same thing (one when typing, one when reading)?
I always felt it's slightly sad that we're stuck with only being able to type the ASCII symbols !"#$%&'()*+,.-./\:;<=>?@~|{} efficiently.
So languages that want to express more with different symbols find it difficult to do so with our limited set. You end up with combinations of symbols that look familiar to existing combination of symbols, and for those who find this problematic to read we have ligatures.
It's a strange claim - to say it's a terrible idea. I've been programming for over 20 years and I've been using a font with ligatures for nearly a year now. For me, personally, it increases legibility and clarity. I feel slightly stunted when I don't have them. I read other people's code with ligatures on just fine as well.
I also hate dark mode and small fonts, and I let my code run way past 120 chars per line when it's right to do so.
I couldn't possibly care how other developers read code. I want them to be able to read my code and so I try to code for clarity, but I can't imagine a font choice or many other IDE preferences affecting their ability to read the code I write.
I agree. The symbol combinations may have different meaning depending on where they appear. Replacing raw symbols with ligatures will create confusion.
I was using this font in Rider when JetBrains made it the default, but gave up after several months. The ligatures were giving me a pause still. The effect was opposite to ease of reading the code.
The "risk of error" is miniscule and trivial to figure when it does occur. The other 99.999% of the time the ease of reading and writing with them more than makes up for those 30 seconds of confusion every couple of weeks.
Hilarious enough, many of the people who claim ligatures are objectively harmful are also those using archaic tools like vim/emacs. The number of errors that could've been prevented by highly sophisticated IDEs instead of toy text editors from the 80s is surely orders of magnitude higher than the purely theoretical ligature confusion.
Just played the game with names off and ended up with Fira Code. But since I have the names off, I don't know what second place was, but I think it was Jetbrains Mono based on the look of it.
I use Fira too, currently, but IBM just won for me, with JetBrains as the runner up. I'm actually surprised by that, and learned a lot from this game(?).
I don't much like that differences in sizing are not taken into consideration (not all fonts are equally large at a given pixel size).
I have been using Fira Code extensively and also writing texts. Both in English & in Greek, both spotting my mistakes and reading what I'd written improved within minutes of first trying it out. I may give JetBrains Mono a try as well, though I really am taken with Fira Code.
Unfortunately I have yet to find the perfect general purpose font to use in general. Ubuntu fonts do come really close to being perfect.
This site is pretty neat! It's a bit weird it doesn't have Menlo, Monaco, etc. to compare to some widespread fonts. I'm not sure what I'd pick if those were mixed in.
1) Looking at the font names I eventually picked my favorite/workhorse: IBM Plex.
2) With hidden names, I picked Courier Prime, which I disliked at first sight.
3) Again with hidden name, I picked Cousine, which looked alright in the simulator but had lines that were too strong and even on my more contrasted color scheme. I prefer fonts with varying line widths, which the game didn't really detect -- it was mostly unreadable versus readable.
My favorite based on the game is Inconsolatas. However after installing it I realized that the game doesn't show different variations of the font (bold, italic etc..). This can easily give a wrong impression of the font when one is using combinations of different variations in an editor.
Bitstream Vera Sans Mono has been my monospaced font of choice for years, but having seen JetBrains Mono when I started playing with their IDEs last year… it’s really good, and has some features I prefer over BVSM.
My experience with JetBrains Mono is that it's too aesthetic/overdesigned for coding (coming from Fira Code), but it makes an excellent monospace typeface for image design.
Following æsthetic at the cost of function is a complaint I’d make of Fira Code, not JetBrains Mono (disregarding ligatures, which both overdo): Fira Code’s r glyph is lousy, its & poor for code where immediately followed sans whitespace by letters (common for reference syntax in C-family languages; it’s much too similar to a letter, especially given the high ex height), and its ff ligation (two columns → one) downright idiotic.
Actually, I must amend what I said: I was talking about Fira Mono rather than Fira Code. Fira Code fixes the r glyph (its default r glyph is excellent and its alternative perfectly respectable, still having narrowed the base line), and offers a better ampersand as an alternative. Dunno about the f ligations (ff, fi, &c.), hopefully they ditched that madness (even if they’re opt-in discretionary ligatures in Fira Mono—they just have absolutely no place in a monospaced font, dlig or no dlig).
It seems like I might have to make another amendment as I just came across something labelled Fira Mono that also seems to have the fixed r glyph. I’m throwing in the towel, there are too many things called Fira Mono and Fira Code and I can’t find any one sound canonical source; some seem to say there are a bunch of changes between the two, others seem to say it’s only a different line-height; did they perhaps start out more different but get mostly merged back? I give up. All I know is that places like bugzilla.mozilla.org and crates.io use bad versions of some Fira monospace font.
I've been working on a new typeface[1][2] for code - Berkeley Mono. I've taken some inspiration from Jet Brains Mono, SF Mono, Bit Stream Vera, Andale Mono, OCR-B, Univers, Eurostile and Monogramma from the 50's, and weird things like the German License Plate slashed 0. Anyone interested in beta testing? neil@berkeleygraphics.com.
Matter of taste, but I like and recommend single-storey a in the regular not just the italic type face as variant. Or preferably even as default/only variant as I don't find switching double-storey to single-storey, or other drastical change of basic shapes for that matter convincing for a coding font.
Thanks for the feedback. Double-storey ‘a’ does make things busy. I’ll see what I can do with optional single storey ‘a’ as a stylistic set. The problem with stylistic sets is no one uses them and they’re not well supported in programming tools. I’ve got automated font file generation script in Glyphs app that generates all variants as separate fonts, so users can download whatever they want. I’ll try to create a single storey ‘a’ as an option, definitely for italics which are still under development.
Unlikely. Explicitness and the binding between the code you see with the eyes and the keys on the keyboard shouldn’t be violated IMHO. Ligatures add ambiguity (“what’s this symbol? Which keys were pressed to create it?”), great for manuscripts and literature but not so great for code I personally think.
I am thinking for sale, after one year make it open source? Another option is to make it free for personal use, and paid for commercial use. Font licensing is too complicated and I want to simplify it just as if I were to purchase the font for myself - unlimited use for anything and everything. No one should have to worry about using fonts for obvious use cases such as embedding in avionics, etching on nuclear power plant control panels and designing submarine bailout signs.
Absolutely love this font, been using the Nerd fonts patched version for a very long time for my terminal-based workflows. One really minor gripe that I have with it is the triple asterisk ligature which I have no use for. But it's so minor that I never bothered to patch this symbol out.
I’ll be giving JetBrains Mono a try, but for the past few years I’ve been enjoying Dank Mono[0] for writing Swift, Obj-C, Kotlin, and C#. In particular I like its handwriting-inspired italic style, which works well for adding contrast to things like keywords.
I also use dank mono and really like it. Its similar to JetBrains Mono and Roboto Mono, but a bit crisper and slightly more space efficient. Looks equally good on my Mac retina display and my Windows 1080p display.
My favorite is still Go Mono (and not only for Go) - mostly because I prefer the good old "typewriter-style" fonts with serifs. "Sans-serif" monospace fonts look odd to me because most letters are sans-serif, but then they have to add serifs to I, i, l, 1 etc. to avoid having them look "skinny".
What are the benefits of such a width range? Does it mean the user can adjust the thickness of the characters independently of font size, or something else?
That is already possible with just a weight axis. The benefit is a lot more flexibility in design and layout, plus just a preference. The Iosevka font also being discussed here today is on the narrow side, while Source Code Pro is slightly wider and Courier even more so. Inconsolata can cover all these and more.
Am I the only one rocking with agave? Especially agave NF, it looks a bit funky (casual-looking) but it's been really easy on my eyes on not-too-high res display(34' 1440p).
Absolutely amazing font. Used it since the first day it was out and never looked back. Improved the code readability for me so much it’s among the first things I setup on a new Mac. I also use it for the terminal, as a font override in dark reader on a bunch of websites, …
Anyone have good examples of proportional width fonts that have coding focused changes, like well differentiated 0/O and I/l and or coding ligatures? I've been really happy just using Avenir for coding for the last 10 years or so, but I'd love something proportional that was a bit more coding aware.
rant: Fixed width fonts are an abomination invented b/c they were easier to program for display in early terminals and computers have long since been fast enough to eschew them forever.
Nice to meet another fan of proportional fonts! I find them so much more readable than monospaced.
My current favorite is Trebuchet MS, or more specifically a version of it that I tweaked in FontForge and call Trebuchet++.
Trebuchet MS ticks a lot of the boxes for me "as is". It doesn't have ligatures, but does have easily distinguished 0/O, I/l, etc. And it renders beautifully on the high-DPI monitors I use with the largish font sizes I prefer. I do most of my coding on a 24" 4K monitor, so it's just shy of 200 DPI, and I run it with 200% scaling on Windows and Linux.
One thing I don't like in Trebuchet MS is the tilde. It is a scrawny little thing that is hard to distinguish from a hyphen. So I used FontForge to swap in a much better tilde.
Then I had some fun with underscores.
I don't like snake_case_names at all, but some coding standards mandate them. One problem with proportional fonts is that the underscore is much wider than the period, so you get this effect:
snake_case.snake_case.snake_case
If you look at the spacing between words here, "case.snake" is more tightly grouped than "snake_case" - the opposite of how it should be.
I fixed this by adding a bit of space on each side of the period, and narrowing the space occupied by the underscore.
At first I tried just making the underline itself shorter, but it was hard to tell from a period. So instead I kept most of the underline width and narrowed the character box instead. The underline tucks under the adjacent characters a bit, but it looks OK.
The net effect is subtle, but for my eyes it makes snake_case.snake_case a little easier to read and understand.
I have been meaning to find out if and how I could open source Trebuchet++ (since it's based on a Microsoft font), but in the meantime drop me a note if you would like a copy to try out - email is in my profile.
194 comments
[ 3.0 ms ] story [ 255 ms ] threadhttps://jetbrains.com/mono
[1] https://github.com/microsoft/cascadia-code
(someone should do a hn poll on programming fonts.)
That's terribly blurred on my screen.
1) It should give you a list of runner ups, not just the final winner.
2) It should include MORE fonts. Some popular ones aren't in there. Maybe it should be a local app that can use your installed fonts.
I like the old italics better.
I ended up going with a slashed zero variant of JetBrains Mono. Now it's perfect.
My history is: Monoid -> Iosevka SS05 -> Essential PragmataPro
I just compared the latter two to JetBrains Mono, and at least on my settings, doing a blink comparison, they both look more clear to me.
> And not because I’m a purist or a grump. (Some days, but not today.) Programming code has special semantic considerations. Ligatures in programming fonts are likely to either misrepresent the meaning of the code, or cause miscues among readers. So in the end, even if they’re cute, the risk of error isn’t worth it.
- Matthew Butterick, Ligatures in Programming Fonts: Hell No, https://practicaltypography.com/ligatures-in-programming-fon...
[0]: https://github.com/madmalik/mononoki/issues/29#issuecomment-...
- Me
I honestly really didn't like them at first, but I came to love Fira Code after a couple false starts.
My IDE catches the errors this guy mentions.
I also think it would be interesting if a programming language used the Unicode characters that ligatures simulate rather than combinations of general purpose characters, but that seems unlikely given that it’d require a new programmer-oriented keyboard layout.
Dyalog still has special APL keyboards.
The worst offenders tend to be anything involving '!' and '=' and the many varying stylistic interpretations of it. It appears that font designers are in a race to outdo each other, or introduce it for the 'coolness' factor and eschewing the practicalities involved.
But I don't want to be a grump and I do keep trying out ligature fonts every now and again, always with negative results.
Perhaps if some radical homoglyph defenses get established they could also take this sting out of ligatures? (how about highlighting everything that cannot be typed with your current keyboard layout, or with the layouts in whatever quick access scheme you might have?)
Yeah, no thank you.
Also, I notice that Jetbrains Mono doesn't ligature ~= as !=, but that is what it means in Matlab. So it really seems like assumptions about language semantics is baked in to the font.
Jetbrains Mono does offer the no-ligature version.
Having a ligature for != but not for the others betrays its language-independent semantics.
!= in Matlab is not legal logic operator.
Also, != might be part of regular expression.
Using Haskell is one such situation. Haskell's inequality operator is /= which someone could expect when they see ≠. Some people redefine != as a custom operator (see link), which can bring even more confusion with this ligatures.
While this is true, it doesn't seem to come up that often in practice. I'd say this appears when I'm viewing log files or something that isn't a programming language.
Also, if something doesn't turn red when you swap an = for a == then it's time to re-evaluate code coverage.
Edit: I should note that I mainly write C and C++. Other languages may make ligatures less pleasant
Bottom line is it's just there, enable or disable depending on your preference.
Let's say "→" misrepresents the meaning of "->" even as much as 0.1% of the time. Would you rather your risk of error be 99.9%, or 0.1%?
I'm sick of anti-ligature people telling everyone else not to enjoy their fonts, on every single post about a font. Ligatures have caught on for a reason.
Most other ways of code sharing you just copy and paste into a non-ligature font if you need to.
Aside: "ASCII" symbols are neither universally shaped or styled either. The easiest and obvious example to mind is the plain 0, dotted 0, slashed 0 choice and confusion with nearby symbols such as O and o and θ (Theta, not far away in "Extended ASCII"). Similarly all the variations of lower-case L (versus 1 and i). Those choices vary considerably between fonts and are another huge reason some people prefer certain monospace fonts over others and the debate over "best" will likely be an ever ongoing one. You may not think these issues compare to ligature use, but it's exactly the same sort of style debates.
Who is doing that? Certainly not the author. It sounds to me like you're taking the author's opinions as a personal affront, which seems... weird.
It's certainly not the most neutral phrasing.
The point is that programming isn't just an exercise in semantics. But it is deterministic symbolically.
I've used ligatures now for several years (with JetBrains Mono in particular for some time). I've done lots of pair programming and a common immediate reaction is "How can I get those too?! It makes it so nice to read and understand".
Instead of throwing them out because of some edge cases, why not improve the software for the edge cases?
But I still use them ;).
That leads into my personal issue with ligatures: they change what should be a binary operation into a more complex one. Instead of "I see equals signs, one space or two?" it becomes "I need to stop, change to a vertical reading direction, and see if that's 2 or 3 lines" or "I need to estimate if that is 2 or 3 characters worth of width, or get off track comparing it to characters on the line above." Comparison operators should simply be "greater space equals" but become "wait, was there a second line there? I have to go back and double check that."
I'm sure someone will come along and say "how is reading the number of spaces different than reading the number of lines?" It might be that the spacing is normalized without ligatures, it might just be the vertical spacing in ligatures is too small, I don't really know. It's incredibly difficult to convey this to someone who doesn't experience it, all I can say is it is a night and day difference to me.
I've given Fira Code a shot 2 or 3 times but have found the ligatures to hinder my productivity every time. I also tried them just in the "reader mode" with Jetbrains Mono when that feature was first released, but had to turn it off after a few days.
That all being said, I won't fault anyone for using them if it helps them in the same way that not using them helps me. I'm just glad they can be disabled in Jetbrains Mono as it is otherwise an incredible font.
I'm sure it's a highly personal thing, but Matthew Butterick proclaims it's more universally bad than it actually is.
That is why there's a checkbox for enabling ligatures.
Like why is this a thing? It's like proclaiming certain font sizes aren't worth it. My dev machine is my interface. I should be able to do what I like with it.
Edit: I guess he addresses this in a footnote, but hardly:
> “What do you mean, it’s not a matter of taste? I like using ligatures when I code.” Great! In so many ways, I don’t care what you do in private. Although I predict you will eventually burn yourself on this hot mess, my main concern is typography that faces other human beings.
A) I've never burned myself b) other than screen shares (again, nary a complaint, but several "cool! How do I get that?") I'm never rendering code for others to consume. I agree that a ligatured font would be bad e.g. for publishing code in a whitepaper.
So I can imagine when there are tools to prettify code for blogs this can become an issue for some languages.
While not entirely related to ligatures, my own biggest offender has been strange whitespace being treated as an identifier in LuaJIT. Mostly caused by my Norwegian keyboard layout producing strange whitespace when you want to write the not operator "~=" if you're not careful enough.
You can blame many parts here, LuaJIT for allowing this in the first place, editors lacking tools to deal with it or normalize pasted code, me for not using a us layout, me copy pasting code, or me not being careful enough.
Thankfully vscode will now highlight non standard whitespace with a yellow box. And best of all I've learned to be aware of these things when copy pasting code from the browser.
> I don’t care what you do in private. Although I predict you will eventually burn yourself on this hot mess, my main concern is typography that faces other human beings. So if you’re preparing your code for others to read—whether on screen or on paper—skip the ligatures.
Surely the readers are reading the code in the font of their choosing. If they get miscued by ligatures, that's squarely on them, because they're the ones that chose to read it in a ligature font. That's the beauty of fonts - they can be very personal.
So languages that want to express more with different symbols find it difficult to do so with our limited set. You end up with combinations of symbols that look familiar to existing combination of symbols, and for those who find this problematic to read we have ligatures.
I also hate dark mode and small fonts, and I let my code run way past 120 chars per line when it's right to do so.
I couldn't possibly care how other developers read code. I want them to be able to read my code and so I try to code for clarity, but I can't imagine a font choice or many other IDE preferences affecting their ability to read the code I write.
I was using this font in Rider when JetBrains made it the default, but gave up after several months. The ligatures were giving me a pause still. The effect was opposite to ease of reading the code.
Hilarious enough, many of the people who claim ligatures are objectively harmful are also those using archaic tools like vim/emacs. The number of errors that could've been prevented by highly sophisticated IDEs instead of toy text editors from the 80s is surely orders of magnitude higher than the purely theoretical ligature confusion.
https://www.codingfont.com/
Playing that game though ended up with liking Roboto Mono the most, Fira being a close second.
Whenever I try the winning font (b612, fira mono), I always go back to Liberation Mono.
I have been using Fira Code extensively and also writing texts. Both in English & in Greek, both spotting my mistakes and reading what I'd written improved within minutes of first trying it out. I may give JetBrains Mono a try as well, though I really am taken with Fira Code.
Unfortunately I have yet to find the perfect general purpose font to use in general. Ubuntu fonts do come really close to being perfect.
1) Looking at the font names I eventually picked my favorite/workhorse: IBM Plex.
2) With hidden names, I picked Courier Prime, which I disliked at first sight.
3) Again with hidden name, I picked Cousine, which looked alright in the simulator but had lines that were too strong and even on my more contrasted color scheme. I prefer fonts with varying line widths, which the game didn't really detect -- it was mostly unreadable versus readable.
[0] http://terminus-font.sourceforge.net/
But Deja Vu Mono is notably absent and I still prefer that.
[1] https://neil.computer/notes/introducing-berkeley-mono/
[2] https://neil.computer/notes/berkeley-mono-december-update/
Always switched back to Ubuntu Mono.
It may not be the coolest looking font, but the most legible to me.
[0]: https://philpl.gumroad.com/l/dank-mono
People may not know that Inconsolata is now a 2-axis variable font with a particularly wide width range: 0.5 to 2.0 of the nominal width.
https://github.com/blobject/agave
rant: Fixed width fonts are an abomination invented b/c they were easier to program for display in early terminals and computers have long since been fast enough to eschew them forever.
My current favorite is Trebuchet MS, or more specifically a version of it that I tweaked in FontForge and call Trebuchet++.
Trebuchet MS ticks a lot of the boxes for me "as is". It doesn't have ligatures, but does have easily distinguished 0/O, I/l, etc. And it renders beautifully on the high-DPI monitors I use with the largish font sizes I prefer. I do most of my coding on a 24" 4K monitor, so it's just shy of 200 DPI, and I run it with 200% scaling on Windows and Linux.
One thing I don't like in Trebuchet MS is the tilde. It is a scrawny little thing that is hard to distinguish from a hyphen. So I used FontForge to swap in a much better tilde.
Then I had some fun with underscores.
I don't like snake_case_names at all, but some coding standards mandate them. One problem with proportional fonts is that the underscore is much wider than the period, so you get this effect:
snake_case.snake_case.snake_case
If you look at the spacing between words here, "case.snake" is more tightly grouped than "snake_case" - the opposite of how it should be.
I fixed this by adding a bit of space on each side of the period, and narrowing the space occupied by the underscore.
At first I tried just making the underline itself shorter, but it was hard to tell from a period. So instead I kept most of the underline width and narrowed the character box instead. The underline tucks under the adjacent characters a bit, but it looks OK.
The net effect is subtle, but for my eyes it makes snake_case.snake_case a little easier to read and understand.
I have been meaning to find out if and how I could open source Trebuchet++ (since it's based on a Microsoft font), but in the meantime drop me a note if you would like a copy to try out - email is in my profile.
https://news.ycombinator.com/item?id=29010443