Sunday, September 06, 2015

Fonts Using Ligatures for Code

Just heard about this and it seems kind of interesting. Most programming languages just use plain ascii characters, particularly for operators. As a result, sequences such as ->, =>, >=, /= are commonly used. If you want better typography, apparently some fonts now use ligatures to make them display better. The nice thing about using ligatures is that nothing changes but the display, the number of characters is the same (unlike if you used Unicode characters).

  • Hasklig extends the font Source Code Pro with such ligatures.
  • FiraCode extends the font Fira Mono

I haven't tried these yet, but apparently the emacs mac port I use now has a mode that supports them.

No comments: