Live data from Hacker News

Ligatures in Programming Fonts: Hell No

practicaltypography.com

11–20 of 89 posts

Re: Ligatures in Programming Fonts: Hell No

#11
post #5

It also makes the lives of terminal emulator developers much more difficult. Won't someone think of the terminal emulator developers?

Luckly on many OS the terminal is just yet another graphical application, not something trying to emulate 40 years old hardware.

Re: Ligatures in Programming Fonts: Hell No

#12
I thought programming fonts are typically monospaced, which means collisions (which create the need for ligatures) aren't much of an issue. I agree that ligatures aren't good in programming, but it just seems the need wouldn't be that great. Or am I missing something?

Re: Ligatures in Programming Fonts: Hell No

#13
post #11
post #5

It also makes the lives of terminal emulator developers much more difficult. Won't someone think of the terminal emulator developers?

Luckly on many OS the terminal is just yet another graphical application, not something trying to emulate 40 years old hardware.

(You're talking to the developer of iTerm2, which is a graphical application. iTerm2 took a while to support ligatures: https://gitlab.com/gnachman/iterm2/issues/3568)

Re: Ligatures in Programming Fonts: Hell No

#15
post #7

I've been using fonts w/ ligatures in my IDEs for many years now with many different languages. Not a single issue, ever. I do get the point that author is making here, but it's only important for these kinds of discussions in a vacuum, detached from reality, as self-important typography and design blogs usually are.

[deleted]

Re: Ligatures in Programming Fonts: Hell No

#16
> If you don’t believe me, try it for 10 or 15 years

nope, I still haven't ever run into the described issues. but that's not even why I disagree with the author. if I _did_ run into an issue, it absolutely wouldn't be the font's problem. this is akin to blaming a crypto algorithm for a security flaw caused by a bad implementation. fonts are software and IDEs can simply provide an option to disable ligatures. and, often, they do:

in sublime: https://www.sublimetext.com/docs/3/ligatures.html

in vscode: https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions

in atom: use CSS

Re: Ligatures in Programming Fonts: Hell No

#17
post #16

> If you don’t believe me, try it for 10 or 15 years nope, I still haven't ever run into the described issues. but that's not even why I disagree with the author. if I _did_ run into an issue, it absolutely wouldn't be the font's problem. this is akin to blaming a crypto algorithm for a security flaw caused by a bad implementation. fonts are software and IDEs can simply provide an option to disable ligatures. and, of…

> fonts are software and IDEs can simply disable ligatures.

Yeah but the author is suggesting that using a particular font will increase the likelihood of a programmer introducing some syntactically correct but erroneous code. But then he doesn't actually give any examples. So I don't buy it either. Maybe certain languages are more susceptible?

Re: Ligatures in Programming Fonts: Hell No

#18

Used judiciously, ligatures can help make code more readable, not less. Consider JavaScript's == and ===, and their inverses != and !==. I personally find them difficult to visually distinguish on occasion (especially the negative forms). Fira Code [0] replaces them with two-bar and three-bar equals signs (something like =, ≠, ≡, and ≢, only wider; see the link for a screenshot). I personally find these easier to dis…

> Fira Code [0] replaces them with [...]

And that's how it should be done. If you want something modified visually then you can modify it for yourself without pushing it on the rest of the world.

Edit: Disregard that, I was being dumb.

Re: Ligatures in Programming Fonts: Hell No

#19
If anybody wants an example of where ligatures will cause problems, try playing a roguelike in a console using the Fira Code font with ligatures turned on. It demonstrates that accidental collisions end up with completely different glyphs. My first experience with this was with Dwarf Fortress in text mode.

But... I have to say that this is the only place I've actually come across it. I eventually decided that I don't like ligatures, personally, in my source code. However, the chance of problems occurring is pretty remote.

Re: Ligatures in Programming Fonts: Hell No

#20
Fira Code's main problem is that it tries to be a font for all programming languages which results in some weird behaviours here and there. Unfortunately, there's no good way to have a font have sets of ligatures per .

That said, however, the article fails to provide a compelling argument against ligatures.

1. Fonts have nothing to do with Unicode. It's exactly the font's job to provide any glyphs or ligatures it wants on top of provided characters.

2. Programming languages have been long stuck in ASCII-land trying to emulate symbols commonly used in other areas such as mathematics: -> and => are arrows, == and === are equality and congruence, >= and =are greater than/less than or equal to, and the list goes on. These will never be easy to type in their original form (unless you have APL's custom keyboard), so why not present them as such?

3. Computers have all but destroyed typography, and it's a good thing some of it is coming back. Properly spaced numbers? Properly spaced and aligned punctuation? Contextually correct punctuation? Yes, please, more!

So, what's the beef with ligatures? I don't know :) And yes, I've been using Fira Code for several years now.

Ironically, the article says "well-intentioned amateur ligaturists are adding dozens of new & strange ligatures." and uses what appears a "° DEGREE SIGN U+00B0" that looks like a link to a footnote to denote external links.

Edit: minor corrections to readability

Post reply on HN