Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Going through this, I was introduced to <= being converted to a ligature which immediately ruled it as a nope for me. No monkey business with the characters of my code thank you very much.
 help



This is also the first time I've noticed that some fonts have the center cane of the lower-case "m" shorter than the other canes. I love that!

Interestingly, Ubuntu Mono was the font I landed on - which is already the font that I use. At least I'm consistent.


I tend to bounce around between Ubuntu Mono, Fira Code and Comic Mono. Comic Mono is not amongst the participants in this game, and my finalists were Ubuntu Mono and Fira Code, so I guess I'm pretty pleased that I've stayed consistent as well!

That is usually configurable at the terminal level- for example, both wezterm and ghostty have available configs to control this behavior.

> That is usually configurable at the terminal level

And if you use Emacs, it's configurable at the buffer level. [1] This lets me build a version of Iosevka where `~=` and `!=` both become ligaturized but in different major modes, avoiding any confusion.

[1]: https://github.com/mickeynp/ligature.el


Good to know. I’ve been using ghostty and generally not a fan of the code ligatures (or just too stubborn to adapt!).

I'm not either. I think it may look "cool" visually but when trying to work with code with those in it, it seems odd, like that it's a single character even though it's not and it just breaks the flow

I didn't like them either. Thankfully, they can easily be disabled. See my config: https://github.com/pmxi/dotfiles/blob/e779c5921fbe308fad0c95...

Because most of those who commented are among those who do not like ligatures, I must present a counterpoint, to diminish the statistical bias.

Some people like ligatures, some people do not like them, but this does not matter, because any decent text editor or terminal emulator has a setting to enable or disable ligatures.

Any good programming font must have ligatures, which will keep happy both kinds of users, those who like and those who dislike ligatures.

I strongly hate the straitjacket forced by ASCII upon programming languages, which is the root cause of most ambiguous grammars that complicate the parsing of programming languages and increase the probability of bugs, and which has also forced the replacement of traditional mathematical symbols with less appropriate characters.

Using Unicode for source programs is the best solution, but when having to use legacy programming languages in a professional setting, where the use of a custom preprocessor would be frowned upon, using fonts with ligatures is still an improvement over ASCII.


A coding font is supposed to help you distinguish between characters, not confuse them for each other. Also, ASCII ligatures usually look worse than the proper Unicode character they are supposed to emulate. The often indecisive form they take (glyphs rearranged to resemble a different character, but still composed of original glyph shapes; weird proportions and spacing due to the font maintaining the column width of the separate ASCII code points) creates a strong uncanny valley effect. I wouldn't mind having "≤", "≠" or "⇒" tokens in my source code, but half-measures just don't cut it.

No need to rely on app-specific configs. You can disable it globally in your fontconfig. For example, this disables ligatures in the Cascadia Code font:

  <match target="font">
    <test name="family" compare="eq" ignore-blanks="true">
      <string>Cascadia Code</string>
    </test>
    <edit name="fontfeatures" mode="append">
      <string>liga off</string>
      <string>dlig off</string>
    </edit>
  </match>

Here is someone disabling ligatures for Noto Sans Mono: https://blahg.josefsipek.net/?p=610

This is optional. There is a checkbox on the site to disable ligatures.

I like most ligatures, I wish I could selectively turn off just this one.

I love ligatures but I wish there was tooling for context sensitive ones. This is a really good example. When developing, I love <= turning into ≤. When running a cli that happens to use <= for the start of its progress bar… not so much

You are in luck! Editors do support customizing which ligatures get used where. For example, ligature.el lets me set only certain ligatures in certain modes. I like ligatures in Haskell, but dislike them in prose. I don't really customize at a finer-grained level than modes, but I could. Other editors should have similar configs.

I don't like them as well. On this site, you can disable them with the checkbox on the top-right



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: