25 ms·
FiraCode: Free monospaced font with programming ligatures
- wildrhythms 3y agoI used this font for a while, it's very readable, but my brain can't parse ligatures at all. When I'm dealing with !== === == I need to be able see every character and how they line up vertically.
- bobnamob 3y agoTo kick start some discussion, I’ve been using FiraCode (with ligatures on) for the last year or so. No complaints, it stays out of the way like a good font should. I’ll admit I prefer ligatures while working with ML syntax and Lisps, they feel a little wrong(?) when working with C style languages. Is anyone aware of a way to toggle them on a per language basis in vs code?
- deleted 3y ago[deleted]
- wlkr 3y agoYou can accomplish this through the settings. "[c]": { "editor.fontLigatures": true },
- mvid 3y agoThis is the first setting I make when configuring IntelliJ on a new machine. Also make sure to enable ligatures
- sbalamurugan 3y agoThis works really well with the R’s native pipe |> Make the R code look really nice!
- justjoined2 3y agoYes! For anyone curious, this is how it looks (just some random code I'm working on): https://i.snipboard.io/F4zwad.jpg https://i.snipboard.io/F4zwad.jpg.
- wlkr 3y agoOf course, this is all very subjective, but I do find Fira Code to be a beautiful coding font. I also appreciate having ligatures in fonts nowadays. Fira Code was my go-to for a long time, but I've come to increasingly use Jetbrains Mono which is available under the same Open Font Licence and is quite similar (although slightly preferable visually to me). https://www.jetbrains.com/lp/mono/ https://www.jetbrains.com/lp/mono/
- jhot 3y agoI'm having trouble finding it now, but at one point I used a tool that put monospace fonts head to head (without revealing their name) and you would choose what you thought looked best. Jetbrains mono was my winner and I've been using it ever since.
- gioazzi 3y agoI believe you're referring to this: https://news.ycombinator.com/item?id=29010443 https://news.ycombinator.com/item?id=29010443
- pepa65 3y agoI used Jetbrain's Mono font for quite a while, until I switched to Julia. I found Julia even clearer.
- sjm 3y agoCan't explain it, but to my eyes Jetbrains Mono is too robotic or mechanical, maybe clinical? whereas I love that Fira has some character and feels at least a bit Humanist for a monospaced font. The iA Writer fonts are another great option.
- ku1ik 3y agoSame here. Fira Code, then JetBrains Mono. JB Mono is very under appreciated, although it’s maybe just a matter of taste.
- AlchemistCamp 3y agoThis was my primary editor font for years! It’s clear, looks nice and is reasonably space-efficient, too.
- Bootvis 3y agoSounds great but you write was. Did you change your font to something else?
- AlchemistCamp 3y agoI changed it to Hasklig, briefly, and then to Iosevka, which I’ve stuck with the past four years.
- Bootvis 3y agoThanks, I'll give Iosevka a whirl.
- risico 3y agoOne of my 2 favourite fonts. I constantly switch between Fira Code and Iosevka. I just wish Fira Code had an Extra Light option, sometimes, depending on the terminal/OS I find Fira Code too chunky.
- sigwinch28 3y agoHave you tried the ss05 variant of Iosevka? It's intented to be Iosevka in the style of Fira Mono. https://github.com/be5invis/Iosevka/blob/main/doc/stylistic-sets.md https://github.com/be5invis/Iosevka/blob/main/doc/stylistic-...
- risico 3y agoI do not think I have, thank you for the suggestion! Will give it a spin
- toastal 3y agoIosevka is nice because it allow customization. I can fix all my little nits or get it paired nicely with a body copy font, & I can fix the big nits like disabling ligature abuse.
- tracker1 3y agoFor consoles outside my editor, I tend to like Cascadia/Caskaydia Code a lot. There's a Nerd font enhanced version you can use with starship.rs even. YMMV though.
- nielsbot 3y agoHi! I’ve returned once more to recommend the Input family of typefaces. https://input.djr.com/ https://input.djr.com/ I’ve been code using Input Sans a (gasp!) proportional coding font for years now and I love it. Input also comes in a monospaced version FWIW.
- taink 3y agoWhile I understand why a font's website would behave this way, I don't think making people dowload 1598 (!) lines of fonts[1] is a good idea; it honestly took so long I was wondering what was so special about their font right about when it started to kick in. [1] https://input.djr.com/css/fonts.css https://input.djr.com/css/fonts.css
- pmontra 3y agoI've been using DejaVu Sans (a proportional font) for a very long time, maybe 10 years, after about 30 years of monospaced fonts. After all we know that they are easier to read than monospaced fonts, tabs or spaces are fixed length anyway so the only thing that I can't do is columns like a = 1 ab = 2 abc = 3 Guess what, this is equally readable a = 1 ab = 2 abc = 3 and some code formatters yield this anyway (eg: Elixir's, if I remember well.) It's a very good exchange: a little feature to miss, much more readable code. I gave a try to Input but it was not OK for me. I can't remember the details. I'm giving a try to Sweden Sans, from yesterday's HN.
- Stratoscope 3y agoI have also been using proportional fonts for at least 10-15 years. I used to use all the column alignment tricks like the one you showed, and stuff like this: do_something_special(first_argument, second_argument, third_argument); Then one day I renamed a function and the length of its name changed, and I had to go through all the code and line things back up again. So I abandoned this kind of column alignment completely and switched to a purely indentation-based format: do_something_special( first_argument, second_argument, third_argument ); (Assume for the sake of discussion that those arguments are long enough that they need to be on separate lines.) That's when the proverbial light went on. I thought, "since I'm not using column alignment any more, why not try a proportional font?" I did just that, and never looked back. If you're not doing column alignment, proportional fonts work just fine. Where I currently work, most of our code is in Python. We used to use the YAPF formatter with Google's settings that are full of column alignment. Last year we switched to Black, and I noticed something interesting. Black-formatted code does not use column alignment at all. It uses only indentation, as in your second example and my second example. So it is just as readable in a proportional font as in monospaced! My current coding font is something I call Trebuchet++. It's based on Trebuchet MS, but with a few customizations that I like for code: a better tilde glyph (the one in Trebuchet MS look too much like a hyphen), a little extra space before and after a dot, and a sneaky trick to make names_with_underscores more readable: I reduced the width that the underscore takes up but extended the underscore below the text before and after it. These last two adjustments fix a problem with stuff like foo_bar_baz.moo_mar_maz() where the underscores are wider than the dot, creating the wrong visual grouping.
- reportgunner 3y agoI prefer the Hack font [0], I don't like ligatures. [0] https://github.com/source-foundry/Hack https://github.com/source-foundry/Hack
- jonesnc 3y agoI like the Hack font too, but I also like ligatures: https://github.com/gaplo917/Ligatured-Hack https://github.com/gaplo917/Ligatured-Hack
- brainzap 3y agoThe font that introduced me to ligatures <3
- jansan 3y agoI do not understand why someone would like to have ligatures in code. And it looks like I am not alone: https://practicaltypography.com/ligatures-in-programming-fonts-hell-no.html https://practicaltypography.com/ligatures-in-programming-fon...
- 112233 3y agoI do understand why someone would like ligatures, just not not the whatever it is that is imlemented now: - if a ligature looks just like a grapheme of another character, why not use that character? why the replacement is done at font level??? - using ligature across morpheme or token boundary is rude typesetting. e.g "selfish" or "c<int>=1;" Other than that, I do not have anything against ligatures that enhance legibility of text (what they are meant to accomplish)
- hxii 3y agoThe link you shared aside, I'd be genuinely interested in hearing your own personal opinion why ligatures are bad in coding fonts.
- CJefferson 3y agoI'm not sure how I could make you understand I like having ligatures. I find they make my code easier to read, and I enjoy their presence. Some people like vim or emacs, some vscode, some eclipse or full visual studio. I personally like that there are an increasing number of different interface choices for people to use when coding. Personally, I'd love to do my coding without a mono-spaced font but most of the world keeps space-aligning things, so that's not going to work unfortunately. Of course, you don't have to use ligatures, no-one is suggesting we make them compulsory
- factorialboy 3y agoEvery time a new monospace font reaches the HN home page, I lose ~3 hours of my day. Not complaining. (You get an upvote)
- sirodoht 3y agoI've tried ligatures in coding for a few months but eventually decided against them. The small parsing overhead isn't worth it just for beauty. The philosophy of form follows function wins again.
- booi 3y agoFor me ligatures improve readability which surprised me after two decades of not having them. I think it’s because operators like != are actually considered a singular symbol not two characters. We just don’t have that many available keys so we use multiple characters. But in my mind it’s a single symbol and ligatures go a long way to help my brain parse it that way
- pie_flavor 3y agoThe whole point is that there's less overhead to parsing a two- or three-character operator as a single thing if it looks like a single thing.
- extasia 3y ago[flagged]
- juliangmp 3y agoFira Code (or rather its nerd font) has been my goto for a few years, its just really nice.
- hxii 3y agoUsed FiraCode for a while, then switched to Victor Mono [0], but found myself going back to Cascadia Code [1]. I can't seem to be able to get along with fonts that are too thin it seems. [0]: https://rubjo.github.io/victor-mono/ https://rubjo.github.io/victor-mono/ [1]: https://github.com/microsoft/cascadia-code https://github.com/microsoft/cascadia-code
- _eojb 3y agoLigatures, IMO, make for a bad coding editor experience. No, I do not want >> parsed as a right shift when it's actually used as two adjacent template delimiters. And no, I'm not okay with the inconsistency that results from the usage of different operators from one programming language to another. Want to change a != to a == operator? Enjoy futzing with placing the cursor properly. It's a cute idea, but I found it more annoying to use in practice.
- jnrk 3y agoI agree. I respect that people use it, but it's really not for me. It makes the code harder to read IMO
- kevincox 3y agoExactly. Personally I like to have it very obvious exactly what characters are in my file. But I also do agree that it looks very nice and can appreciate why people prefer it.
- coffeebeqn 3y agoTo each their own. I have never found them confusing or annoying in a half a dozen languages. If it doesn’t improve readability for your brain then definitely turn them off. In a language like Go or JS there aren’t very many operators so it’s not as bad as C might be. Still a great font without ligatures
- deleted 3y ago[deleted]
- marcos100 3y agoAgree, but for me, maybe because I'm so used to not having them that, when I see it, it grabs too much attention. It doesn't feels right.
- urxvtcd 3y agoYou can always use the original version without ligatures, Fira Mono, available here: https://fonts.google.com/specimen/Fira+Mono https://fonts.google.com/specimen/Fira+Mono
- ninepoints 3y agoLigatures, IMO, make for a bad coding editor experience. No, I do not want >> parsed as a right shift when it's actually used as two adjacent template delimiters. And no, I'm not okay with the inconsistency that results from the usage of different operators from one programming language to another. It's a cute idea, but I found it more annoying to use in practice.
- zelphirkalt 3y agonote: You have a duplicate comment.
- ninepoints 3y agoThanks, blame hackernews for supporting the back button poorly
- jacknews 3y agoI don't see how ligatures make sense for code. For beautiful typography, sure, but not for text you edit with a cursor, etc. IMHO coding really needs a simple monospaced font. I use Input Mpno with a slightly squashed horizontal spacing, and an almost overlapping vertical spacing.
- CharlesW 3y ago> * I don't see how ligatures make sense for code. For beautiful typography, sure, but not for text you edit with a cursor, etc.* Ligatures are just presentational so they don’t impair editing. If you ever try them again and use VSCode, you might like the Disable Ligatures that dynamically disables them for the selected line or cursor position. https://marketplace.visualstudio.com/items?itemName=CoenraadS.disableligatures https://marketplace.visualstudio.com/items?itemName=Coenraad...
- deleted 3y ago[deleted]
- tommica 3y agoFiraCode was my goto for a while, and it really worked well. I'm pretty sure was my first "real" programming font that I chose deliberately. Though I never got used to the ligatures and I did switch over ComicCode[1], I still remember that font fondly. [1]https://tosche.net/fonts/comic-code https://tosche.net/fonts/comic-code
- drekipus 3y agoNice, another comic user. I use comic mono and I absolutely love it. I like to use Monokai/Molokai and joke with my colleagues that I'm using "clown colours"
- ryukoposting 3y agoI like Fira Code very much. I've been using it as my font in all editors and terminals for... 5? years now. Ligatures enabled in editors, ligatures disabled in terminals.
- tonsky 3y ago(creator here) Thanks! I’m glad you are enjoying it!
- tracker1 3y agoI want to say thank you for your efforts as well. Been using Fira Code for about that long myself. I also do like Consolas/Inconsolata and Cascadia/Caskaydia Code as well, but always come back to Fira Code for editing.. the extra spacing is just easier to grok for code imo.
- ryukoposting 3y agoWow! You've done tremendous work.
- clbrmbr 3y agoFirst time I’ve seen an ad on a GitHub page. Not complaining—it’s great to have sponsors for open source—just observing that there is an image advert. Is this somewhat common? Does GitHub have a policy for this?
- deleted 3y ago[deleted]
- amake 3y ago"Oh, a post about a programming font; let's see if there are any comments not from killjoys who can't help but advertise their hatred of ligatures" *opens comments* *shakes head, closes tab*
- amake 3y agohttps://news.ycombinator.com/item?id=34589338 https://news.ycombinator.com/item?id=34589338
- Tempest1981 3y agoAlthough what did you expect, since there isn't much else to discuss about fonts that isn't subjective. We could discuss slashed vs dotted zeros, I guess.
- 8n4vidtmkvmk 3y agoI like the slashes. I think they're fun and help differentiate from Os. Can we get slashed 7s too? Maybe even slashed Zs.
- sarnowski 3y agoWhen downloading Berkeley Mono, you can choose some configurations and I love the slashed 7 (as well as zero). Something feels off to me with the line but overall it’s fun to have in a font.
- tracker1 3y agoAs long as there's something to distinguish zero from a capital letter O. I'm okay with the dot. I wish most typefaces made 0 more distinguishable from O.
- rg111 3y agoI use Cascadia Code PL Nerd Font. What do you use? I would like to learn how most people decide on choosing a monospace font for their code editor and terminal. Is it pure choice based on looks? Or some other things are considered?
- zokier 3y agoI don't think the idea behind ligatures is all bad, but I think font is just not the best layer to implement the concept. What I really would want to see more of is fully typeset code. Fortress had the ability to typeset code with TeX, but that was afaik not editable. Something in that vein would be great imho. The community being so fixated on monospaced fonts is imho holding code readability back a lot.
- tmountain 3y agoI like trying different coding fonts, and I like FiraCode for its aesthetic qualities, but I don’t use it because it’s a bit too heavy visually for my taste. My favorite coding font is the Go font. It’s very readable and brutally simple. https://go.dev/blog/go-fonts https://go.dev/blog/go-fonts
- throwaway2990 3y agoWow did they finally fix firacode? No more stupid heights between letters making it look like each letter is sitting on a different horizontal pixel.
- sanex 3y agoWhen I was new to coding the ligatures didn't help my understanding but after a couple years I switched to FiraCode and I love it. Very easy on the eyes.
- aCoreyJ 3y agoAnother good one is JetBrains Mono: A free and open source typeface for developers https://www.jetbrains.com/lp/mono/ https://www.jetbrains.com/lp/mono/
- PointThink 3y agoI also really like Iosevka https://github.com/be5invis/Iosevka https://github.com/be5invis/Iosevka
- Sverigevader 3y agoComing from a life time of Visual Studio, when changing to Rider, the first thing I did was to change the font to that of VS. I can't quite explain it but reading the code in the Rider default font (which I believe is JetBrains Mono) made me feel nauseous/queasy.
- tracker1 3y agoConsolas/Inconsolata is a great typeface... I like it a lot. Cascadia Code (introduced with MS Terminal, aka Caskaydia) is also a very great typeface as well. I like Fira Code slightly more though... especially as a terminal font, I use the fork with extra nerd font characters linked from starship.rs[1][2] 1. https://starship.rs/presets/nerd-font.html https://starship.rs/presets/nerd-font.html 2. https://www.nerdfonts.com/font-downloads https://www.nerdfonts.com/font-downloads
- itsTyrion 3y ago> Coming from a life time of Visual Studio There’s the reason. It’s different than what you’ve been seeing most days of the last X years
- Jenk 3y agoHasklig is worth a look, too. I use the NerdFont variant "Hasklug NF" (spelling intentional)
- sgarland 3y agoThis is a stretch: > Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one. I don’t know how many calories are expended by the brain to perform this, but it has to be near-negligible. I am _extremely_ used to seeing characters as they are in ASCII, and retraining myself for some infinitesimal savings in visual processing seems like a net negative. Maybe this is useful if you grew up with them? By all means do whatever you want for your own env.
- azangru 3y ago> Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one. Is the implication that with FiraCode, the eye will finally spend zero energy on scanning, parsing and joining glyphs? Finally, after all these years, a perpetual motion machine! :-)
- deadbeeves 3y agoI'm pretty sure the eye spends exactly zero Joules on interpretation of visual stimuli. As for the brain, the brain doesn't see characters at the perceptual level, that it then needs to join at the cognitive level into tokens. At the perceptual level it just sees shapes. Whether it takes more energy to parse != or ≠ is something I don't anyone has ever researched.
- fho 3y agoYou might be surprised to hear that the eye actually does a lot of "preprocessing" for the brain.
- deadbeeves 3y agoPreprocessing is not the same as interpretation, in the same way that a pixel shader is not computer vision.
- lost_tourist 3y ago
- whalesalad 3y agoFira Code is in my top 5 for sure. I ran it for years but recently fell in love with IBM Plex Mono.
- adamch 3y agoI love ligatures. First thing I do in a new machine is install this font. I won't use a terminal or IDE that doesn't support them.
- Gordonjcp 3y ago> Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one [citation needed] The font looks good but I find it really hard to read C code with the ligated symbols.
- memsom 3y agoI think I have been using FiraCode now for about 8 years? Something like that. Ligatures are the best thing ever. Some of my co-workers don't get it. I can digest code either way, but prefer the concise and crispness of ligatures.
- kandros 3y agoStarted using Comic Mono as a joke but I actually like it now. https://dtinth.github.io/comic-mono-font/ https://dtinth.github.io/comic-mono-font/
- tracker1 3y agoIt's definitely interesting, but a screen full of it kind of looks like noise to me.
- pyrophane 3y agoSpeaking of ligature programming fonts, I enjoy Dank Mono: https://philpl.gumroad.com/l/dank-mono https://philpl.gumroad.com/l/dank-mono. It has a more stylized look than your typical coding font, and I don't use it all the time, but I enjoy swapping it in when Source Code Pro starts to feel a bit boring.
- CharlesW 3y agoInteresting. More about Dank Mono: https://medium.com/@philpl/what-sets-dank-mono-apart-1bbdc1cc3cbd https://medium.com/@philpl/what-sets-dank-mono-apart-1bbdc1c...
- James_Kirk 3y agoI love this font. Use it everywhere, including ligatures. I guess the ligatures might suck for some languages, but to me they are great almost everywhere (Java/Kotlin/Python)
- capitainenemo 3y ago" Ideally, all programming languages should be designed with full-fledged Unicode symbols for operators, but that’s not the case yet." One (minor) language that does have quite a lot of support is Rakudo which allows both unicode and ascii equivalents for many operators. https://docs.raku.org/language/unicode_ascii https://docs.raku.org/language/unicode_ascii
- toastal 3y agoAgda embraces Unicode. PureScript & Haskell (with the UnicodeSyntax extension) both behave pretty well with a lot of Unicode operators (but rely on bicameral scripts as the leading character for deciding if something like a value or a Constructor/Type). Not sure of its status, but ocaml-m17n is a way to get some Unicode support in OCaml which otherwise can’t deal with any of it.
- cannabis_sam 3y agoAgda goes above and beyond that when you consider their mix-fix syntax… While it might not be perfect, it’s a hella lot closer to mathematical proving/programming with normal functional programming “constructs” (for lack of a better word… idris etc, also the struggle with sized types)
- pyrolistical 3y agoAppleScript also did this. I loved it
- 100011_100001 3y agoLast time this came up I really got value out of https://www.codingfont.com/ https://www.codingfont.com/ to compare fonts in a tournament style until I found a font I liked. Years later I'm still happy with my font selection. I consider this passing it forward. Edit: There is annoying popup, but click away from it and you can do the thing.
- munro 3y agoJust thought I'd throw out if anyone is looking for a good monospace font: Menlo https://en.wikipedia.org/wiki/Menlo_(typeface) https://en.wikipedia.org/wiki/Menlo_(typeface) Call me basic, but I love it. :)
- ChrisArchitect 3y ago(2015) Anything new here?
- graypegg 3y agoI love FiraCode! I was using it for almost half a decade before recently switching to Victor Mono. [1] The ligatures do serve a practical purpose to me anyways. I find they make parsing symbols much easier because the same symbol in different contexts looks different when it means something different. There’s a reason it’s a typography option that’s turned OFF in most editors though, I understand why people hate it. Also on the list of things people hate… victor mono has joined-up italics! Which I also love. :) [1] https://rubjo.github.io/victor-mono/ https://rubjo.github.io/victor-mono/
- fu7kt 3y agoThis is clever but obfuscation at the rendering layer is a thing that has bitten me enough that I can't get behind it or recommend it to anyone. Clever though. I think maybe some thought could be put into the font beyond the ligatures too. Keep up the good work though, people should be making more experimental fonts. Typography is so foundational to everything we understand as humans in this post post-modern world but also... you know.... since cuneiform. So while practically I think this idea is problematic, I think it's important work and it sparked some thoughts in me.
- thinkpad13 3y agoI don't like ligatures at all it only confusing
- ncphil 3y agoLove FiraCode. Have it installed and configured for all of my terminals, everywhere. Even on Windows. In fact, the one customization I've done to my work laptop (that I otherwise leave in it's official, shipped, state), is to add FiraCode.
- ilaksh 3y agoI don't suppose this can work with neovim in the terminal?
- nequo 3y agoYou would need to set the terminal font to Fira Code. I have not tried it myself but if your terminal emulator supports ligatures, it should work.
- sandtron 3y agoThis reminds me of something I hacked together to get these ligatures into other fonts: https://github.com/sandtron/auto-ligaturizer https://github.com/sandtron/auto-ligaturizer
- gv83 3y agoI like ligatures but I chose to not use them. I pair program a lot with juniors/people less exposed to nerdities and I don't want them to have an unclear experience or having to explain for the nth time "how to do the solid arrow". In the end, they don't make that much of a difference other than being a small source of aesthethic pleasure. zero impact on supposed readability
- highmastdon 3y agoHaving used FiraCode for a long time, I switched to a very customisable font called Input [1]. I really like the narrowest one for my terminal, as this allows me to fit more on the screen in horizontal direction. I’ve used Ligaturizer [2] to update the font to include ligatures. I believe the ligatures are even taken from FiraCode itself. I wonder how it’s fitting it to the width of a character as it’s much narrower, but still monospaced. - [1] https://input.djr.com/ https://input.djr.com/ - [2] https://github.com/ToxicFrog/Ligaturizer https://github.com/ToxicFrog/Ligaturizer