Live data from Hacker News

FiraCode: Free monospaced font with programming ligatures

github.com

121–130 of 159 posts

Re: FiraCode: Free monospaced font with programming ligatures

#121
post #28

Ligatures, 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 m…

> No, I do not want >> parsed as a right shift when it's actually used as two adjacent template delimiters. I don't like ligatures either, but I think that this depends on the editor. For example, if typing Rust in IntelliJ, if you type `Box >`, it will show two regular ">" characters. But if you type `x >= 3`, it will replace it with a single glyph. https://ibb.co/Dzx0LFG

How about 'x >> 3'?

I would be very surprised if the editor enabled and disabled ligatures in sections of code based on information from a proper parser...

Re: FiraCode: Free monospaced font with programming ligatures

#122
post #28

Ligatures, 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 m…

I never found it hard to edit code with ligatures when I used them. I don't use them anymore, but I don't understand some people's need to shout about how bad they are. Don't use them if you don't like them, use them if you like them, simple as that.

Re: FiraCode: Free monospaced font with programming ligatures

#123
post #28

Ligatures, 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 m…

Fira Code NL: fork that removes ligatures https://news.ycombinator.com/item?id=34809593

Your editor probably also has an option to disable ligatures, so you may want to look into that if you like Fira Code but don't like the ligatures.

Re: FiraCode: Free monospaced font with programming ligatures

#124
post #42

"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*

Ordinary glyphs and ligatures (if any) are generally thought to be designed together. Turning ligatures off is not a proper solution but a workaround---you would be using something different from what was originally designed [1]. And sufficiently many people think most uses of ligatures in programming fonts are indeed bad, therefore those fonts are also bad, thus endless complaints. [1] And if ligatures are designed…

It's a monospace font. Ligatures aren't used to make sequences like 'fi' look stupid, they're used to make sequences often used for mathematical operations look like those mathematical symbols. Turning off ligatures should be completely fine in this case.

Re: FiraCode: Free monospaced font with programming ligatures

#125
post #28

Ligatures, 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 m…

You can generally configure that in your viewer/editor on if to use ligatures or not, separately from the font itself... but if it isn't in the typeface, you don't even get the option if you do want it.

Re: FiraCode: Free monospaced font with programming ligatures

#126
post #107
post #28

Ligatures, 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 m…

My biggest problem is that despite them supposedly being supported by windows 10 I can never get it to work correctly even on totally fresh installs. I’m 0 for 5 at this point. If someone has the magic that actually fixes this, please share. (And yes I enabled utf-8). Also kinda meta but I see three different font related links on the homepage right now? Just coincidence?

It's often a separate configuration option in various editors... I know you have to enable it explicitly in VS Code, for example. It's not on in applications by default.

Re: FiraCode: Free monospaced font with programming ligatures

#127
post #42

"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*

Although 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.

As 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.

Re: FiraCode: Free monospaced font with programming ligatures

#128
post #124

Earlier quoted context omitted.

Ordinary glyphs and ligatures (if any) are generally thought to be designed together. Turning ligatures off is not a proper solution but a workaround---you would be using something different from what was originally designed [1]. And sufficiently many people think most uses of ligatures in programming fonts are indeed bad, therefore those fonts are also bad, thus endless complaints. [1] And if ligatures are designed…

It's a monospace font. Ligatures aren't used to make sequences like 'fi' look stupid, they're used to make sequences often used for mathematical operations look like those mathematical symbols. Turning off ligatures should be completely fine in this case.

I haven't experienced an application that didn't require me to explicitly turn them on.

Re: FiraCode: Free monospaced font with programming ligatures

#129
post #96

Hi! I’ve returned once more to recommend the Input family of typefaces. 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.

I'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: Elix…

I 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.

Re: FiraCode: Free monospaced font with programming ligatures

#130
post #56

Another good one is JetBrains Mono: A free and open source typeface for developers https://www.jetbrains.com/lp/mono/

Coming 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.

Consolas/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 2. https://www.nerdfonts.com/font-downloads

Post reply on HN