Against fancy ligatures in programming fonts

(practicaltypography.com)

14 points | by fanf2 a day ago ago

2 comments

  • D-Machine a day ago ago

    Big long rant trying to very weakly justify a personal preference that you can easily enable/disable if you want, and which is strictly visual anyway. They do almost never go wrong, meaning if you find it makes your code easier to read and more pleasant to look at, this is well worth the essentially negligible number of times they cause an issue. And you can just disable / not use the ligatures in those cases!

  • thezipcreator 17 hours ago ago

    > Are you looking at a != ligature that’s shaped like ≠? Or the actual Unicode character 0x2260, which also looks like ≠?

    In many programming languages, ≠ is not going to be a valid operator. In languages that allow unicode identifiers, it would be a bizarre choice to use ≠ inside an identifier, so you shouldn't have to worry about that case either. This holds for pretty much every other operator that gets a ligature. This only matters for languages like Agda, in which case just.. use a different font. You might even be able to automate this depending on your editor.

    > They’re guaranteed to be wrong sometimes.

    This is true (for example, in C++ I've occasionally had `>` be ligature-ized when it wasn't an operator and was just the end of a template, like `Foo<Bar>`) but it's never really been much of a problem for me; it's easy to ignore.

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

    granted I've only been using Fira Code for more like 4 years or so, but I've always preferred it since I've been using it. I really think this is just a matter of personal preference.

    > So if you’re preparing your code for others to read—whether on screen or on paper—skip the ligatures.

    This I can understand. Ligatures would probably be likely to cause confusion in people who aren't used to them, so I agree that in that situation it's probably best to leave them out.