Live data from Hacker News

Input: Fonts for Code

input.fontbureau.com

51–60 of 136 posts

Re: Input: Fonts for Code

#51

Yet to find something that suits me better than Fira Code. It's a decently good-looking font with ligatures . I'm a sucker for ligatures.

Iosevka for me, you can custom build it with the letter designs you want, it supports ligatures and it's condensed without been cramped (also has Term, non-term and Slab variants in the same build). It's replaced my mono font everywhere , Fira Code is lovely but it feels way too wide once you've used Iosevka. The only font that comes close is Pragmata Pro but that's not free. https://raw.githubusercontent.com/be5invi…

I use Iosevka (in Notepad++) and M+ (in Emacs), both very nice at rather small sizes.

Re: Input: Fonts for Code

#52
It's again a good time to plug the best programming font, the open secret to many - Dina:

https://www.dcmembers.com/jibsen/download/61/

Including its two TTF versions (which are separately notable for using obscure TTF fearure to achieve a proper pixelated look):

http://chrisrickard.blogspot.com/2010/05/geenatcom-dina-ttf....

http://www.geenat.com/?p=66

Re: Input: Fonts for Code

#53
post #11

This is a very nice looking font, I may have to try it out. I’ve pretty much stuck to Roboto Mono (with powerline for shell and ligature symbols [on/off] for editors) the last few years. I personally find it readable.

Just gave it a whirl, purely default Mono settings. Did not feel right. I agree with the sentiments of the curly braces feeling too curly. Maybe after a longer adjustment period it'd be fine, but compared to my years of Roboto Mono, it feels squat.

Also just gave IBM Plex a spin and it too doesn't feel natural. To me Roboto Mono just feels clean, almost clinically precise.

Re: Input: Fonts for Code

#54

Earlier quoted context omitted.

What about SF Mono? I liked it enough to port it to Windows.

I second SF Mono, subjectively it is the most aesthetically pleasing, well proportioned and just plain beautiful to look at. With that, the entire San Francisco type family is extremely well crafted. I just wish it was openly available even for a fee. But, that makes it even more irresistible and valuable for Apple.

Isn't it so... exclusive... that you have to dig the file out of the Xcode.app or Terminal.app bundle to be able to use it in other applications, even on macOS?

Re: Input: Fonts for Code

#55

Yet to find something that suits me better than Fira Code. It's a decently good-looking font with ligatures . I'm a sucker for ligatures.

Iosevka for me, you can custom build it with the letter designs you want, it supports ligatures and it's condensed without been cramped (also has Term, non-term and Slab variants in the same build). It's replaced my mono font everywhere , Fira Code is lovely but it feels way too wide once you've used Iosevka. The only font that comes close is Pragmata Pro but that's not free. https://raw.githubusercontent.com/be5invi…

I will chime in as another huge Iosevka fan.

I have never really liked any of the other popular coding fonts and it really comes down to one thing: They are all stupid sans-serif fonts.

I have found, ever since displays grew out of the garbage 100 dpi age, that serif fonts are vastly more enjoyable to look at and easier to quickly visually discern.

As a result, Iosevka Slab is basically the only code-optimized font I can even consider.

Beyond that, I prefer a narrower font for monospace text. Monospace is already such an awful layout for readability, but, making it narrower at least helps reduce the horizontal scan range without imposing insane limits like 72 character lines.

So, those are my reasons anyway.

Re: Input: Fonts for Code

#56

Earlier quoted context omitted.

Iosevka for me, you can custom build it with the letter designs you want, it supports ligatures and it's condensed without been cramped (also has Term, non-term and Slab variants in the same build). It's replaced my mono font everywhere , Fira Code is lovely but it feels way too wide once you've used Iosevka. The only font that comes close is Pragmata Pro but that's not free. https://raw.githubusercontent.com/be5invi…

> but it feels way too wide It seems the weirdest thing to me that fonts – especially monospaced fonts – vary by width. I'm working on a forum redesign at the moment. Picking a font took a surprising while, because the font the forum had used – Source Sans Pro – is naturally narrow. Put something wider in, and it's entirely not the same. I have, similarly, replaced monospaced fonts everywhere with Fira Code. Characte…

I think Mononoki has reasonably similar proportions to Source Sans (matches better than Source Code), and is pretty and highly legible. Only issue is "bold is taller than normal" and vertically misaligned parentheses.

Re: Input: Fonts for Code

#57
post #49

Yet to find something that suits me better than Fira Code. It's a decently good-looking font with ligatures . I'm a sucker for ligatures.

I loved Fira Code as well but it was love at first sight with IBM Plex https://www.ibm.com/plex/

I was impressed with IBM Plex Sans at first, too. It was going to be my website's main font. I switched it for Inter UI, because it spoke to me more.

(Also, thanks for reminding me of it. I think I've just found the font for a redesign project.)

Re: Input: Fonts for Code

#58
post #23

To be honest, I never understood all these discussion about "coding fonts". They pop up every now and then here on HN but it always seems like bikeshedding to me. Don't get me wrong - I'm aware that there are some folks who may have a vision impairment or some other reason where it really matters. But apart from that, I've been programming for decaded on many different computer systems with many different fonts, and…

There are instances where font matters, and I go back to TurboC on my 8086 and Fortran 'scards' on a VMS mainframe + terminal, so I'm not a whiny mod-crazy hipster. > Fonts Creating Bugs: Some fonts are more prone to errors. Lower case L vs number one, zero vs. capital O, braces vs parens, lowercase g vs 9. Go look at old Unix fixed fonts, and even courier and you can see how hard it is to distinguish. (Unix '10x7' w…

> What kind of savage codes with a proportional font?

I have, for more than a decade. Why do you call me a savage? ;-)

I know you're kidding, of course, but now you owe me (and yourself) a favor.

Go to the linked test page. Pick a color theme you like, change the language if you want and leave the other settings alone. Now do some reading and editing in the source code box.

Don't worry about whether you like or dislike this particular font, Input Sans. I'm not much of a fan of it [1], but it will serve to make the point.

Does the code look OK and editing it works OK?

Now switch the font to Input Mono and take another look. Switch back and forth between Sans and Mono a few times to compare.

(Skip Input Serif for this comparison as it's a rather different style of font. The cursor keys are handy here: click on Input Sans and then use the up arrow to go directly to Input Mono, and down arrow to go back to Input Sans.)

To my eyes the code looks pretty similar in the Sans and Mono variants, how about you?

But Input Sans is a proportional font, not monospaced!

As stkdump noted, proportional fonts only break down if you use column alignment. Take this line in the Python code for example:

          vanillaView = ShowMouseCoordinatesTextBox((20, -30, -20, 22), "", alignment="left", sizeStyle="mini")
If you want to get that down to 80 characters, you might do it like this in a column aligned style:

          vanillaView = ShowMouseCoordinatesTextBox((20, -30, -20, 22), "",
                                                    alignment="left",
                                                    sizeStyle="mini")
The parameters will line up only if you're using a monospaced font. In a proportional font the last two parameters will appear to be shifted to the left.

But you don't have to do it that way! This kind of column alignment has many disadvantages even in a monospaced font. (What if you rename the function or output variable?) Like stkdump, I would use indentation here:

          vanillaView = ShowMouseCoordinatesTextBox(
              (20, -30, -20, 22), "", alignment="left", sizeStyle="mini"
          )
Now you don't have to re-align if you change those names, and the code will be perfectly readable in any font, proportional or monospaced.

Don't get me wrong, I'm not trying to persuade you to start using proportional fonts. I am hoping to persuade you and other developers to be more tolerant of those of us who like proportional fonts, and to avoid column aligned coding styles regardless of the font you prefer. Fair enough?

[1] My favorite coding font right now is Trebuchet MS. It renders beautifully on high-DPI displays, much nicer to my eyes than Input Sans, and it has easy-to-distinguish glyphs for the common mixups like Il|. It does have a wimpy tilde, so I used a font editor to copy in a better tilde from another font.

Re: Input: Fonts for Code

#59

Earlier quoted context omitted.

Iosevka for me, you can custom build it with the letter designs you want, it supports ligatures and it's condensed without been cramped (also has Term, non-term and Slab variants in the same build). It's replaced my mono font everywhere , Fira Code is lovely but it feels way too wide once you've used Iosevka. The only font that comes close is Pragmata Pro but that's not free. https://raw.githubusercontent.com/be5invi…

I paid for the original Pragmata font in 2004, and he has kept sending updates surprisingly often ever since. I suppose I upgraded to Pragmata Pro in 2011, so only 8 years of updates on that. Money well spent for 40 hours a week of use https://www.fsd.it/shop/fonts/pragmatapro/

That looks interesting. Thanks for sharing.

Commenting to find this later on.

Re: Input: Fonts for Code

#60
post #52

It's again a good time to plug the best programming font, the open secret to many - Dina: https://www.dcmembers.com/jibsen/download/61/ Including its two TTF versions (which are separately notable for using obscure TTF fearure to achieve a proper pixelated look): http://chrisrickard.blogspot.com/2010/05/geenatcom-dina-ttf.... http://www.geenat.com/?p=66

Dina looks great in those images -- but at 10pt on my 1440p monitor in VS Code (Win10), it's basically unusable. And I have excellent vision.
Post reply on HN