Choose your next favourite monospaced font. :) - General

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Hazem

Cool site! My favorite font from this list is Input Mono.

It offers customization for some letter shapes and comes in several width variants. For example, it lets you change what the lower-case L looks like, and I like that because many monospaced fonts insist that lower-case L should look similar or identical to the number 1 (why is this even a thing in many monospaced fonts?)

The Input Serif variant (not for programming) is also really good looking.

Fonts to check out that are not on this website:

This font is gorgeous (in all its variants, but especially the Code variant). It was created by a prominent Racket programmer[1]. Caveat: the font costs $$

[1] https://en.wikipedia.org/wiki/Matthew_Butterick

tall, condensed, bitmap font for geeks. Contribute to NerdyPepper/scientifica development by creating an account on GitHub.
Bolt

My favourite is the jetbrains mono! Very cool!

Avi Dessauer

Story time. Fira-code lacks an italic varrient, so I spent hours manually fixing each glyph from an italic auto conversion.

A few weeks later I switched to Victor mono and then jetbrains mono. Several months later I switched back to fira-code.

Torsten Schmits

I use Fira with Victor only for italic

Chris Wendt

If you're looking for fonts with vertically-aligned math symbols, check out https://github.com/chrismwendt/bront for a couple tweaked fonts (nifty colored image diffs are shown)

A few tweaked fonts geared for programming. Contribute to chrismwendt/bront development by creating an account on GitHub.
Hazem

Hmm I really like what you did with Bront Ubuntu Mono. It's much more readable!

Hazem

Also FWIW I support this author's view on ligatures in programming fonts:
https://practicaltypography.com/ligatures-in-programming-fonts-hell-no.html

Torsten Schmits

that reads a bit like satire

Torsten Schmits

"you could mistake the => ligature for its utf-8 counterpart"

Hazem

I used to enable programming ligatures, but I can count at least 3 times where I've shown Haskell code (with programming ligatures enabled) to professional software engineers who didn't know anything about Haskell (or ligatures), only to be asked why Haskell's syntax requires inserting special symbols.

Eventually I stumbled upon the post I linked and was convinced that I should disable them, at least when showing code to others. Knowledge about programming ligatures wasn't as common as I thought.

Asad Saeeduddin

I usually turn off ligatures because they make all my comments read like nonsense

Asad Saeeduddin

i.e. point 2 in that article

Torsten Schmits

Asad Saeeduddin said/near/198383353):

I usually turn off ligatures because they make all my comments read like nonsense

I configured my neovim to use italic typeface for comments and my terminal to use a different font for italic!

Torsten Schmits

Hazem said/near/198383253):

only to be asked why Haskell's syntax requires inserting special symbols.

I'd think that saying "it's just my font" would clear that up easily enough for this to be a bit of an overreaction :smiley:

Hazem

@Torsten Schmits

I'd think that saying "it's just my font" would clear that up easily enough for this

I wish! The issue is deeper than that. Normally, ligatures are used to clarify something, rather than obscure it. e.g. the fi ff fl ffi examples in the link. Some (but not all) programming ligatures, on the other hand, are obscuring the underlying syntax in many cases.

For example, is the arrow ligature equivalent to --> or -> ?
What about the ligature for "not equal to"? is the underlying syntax =/= or /= or /== or != or !==?

These answers are only obvious if you already know the language, but not so if you haven't seen its syntax before.

e.g. If I share a screenshot of my code online (like in a blog post or on Twitter), I might mislead any audience that is not familiar with ligatures and Haskell's syntax.

I think the same applies to publishing programming books. I don't think printed Haskell books should have ligatures in the printed code. Sure, ligatures can be clarified in the preface of the book, but many readers will skip that.

So in the end, even if they’re cute, the risk of error isn’t worth it.

Torsten Schmits

@Hazem I don't doubt the potential for mistaking operators, but the magnitude of its effect seems a bit blown out of proportion to me. Knowing which exact operator is used might be of little relevance if you're not familiar with them in the first place.

Torsten Schmits

or rather, what is the concrete scenario we're talking about? typing the code from a screenshot out for yourself?

Torsten Schmits

it just sounds so edge casey to me that using a pastebin or changing the font for the occasion seems acceptable

Hazem

Knowing which exact operator is used might be of little relevance if you're not familiar with them in the first place.
what is the concrete scenario we're talking about?

  • Reading a printed Haskell book where the code is printed with programming ligatures, for instance.
  • A screencast teaching Haskell to beginners, where the presenter has ligatures enabled
  • A blogpost to teach Haskell where all the code has ligatures

For personal use, any font is fine. For publishing code, there are many considerations to keep in mind, and accessibility to the widest possible audience is a main one. BTW none of this would be problematic if programming ligatures were as carefully designed as the ffi fi fl ligatures.

Torsten Schmits

ok, I was under the impression that the criticism was about personal use