Programming Fonts with Ligatures added (& a script to add them to other fonts)
Go to file
2018-01-19 19:54:22 -05:00
images Updated README 2017-10-19 12:49:18 -07:00
input-fonts added IBM Plex Mono, SF Mono with Semibold weights, updated README 2017-10-15 17:36:12 -07:00
output-fonts added IBM Plex Mono, SF Mono with Semibold weights, updated README 2017-10-15 17:36:12 -07:00
.gitignore Initial commit 2017-08-07 22:21:10 -07:00
FiraCode-Medium.otf Initial commit 2017-08-07 22:21:10 -07:00
ligatures.py Pull ligature list into a separate file for easier updates 2018-01-19 19:48:48 -05:00
ligaturize.py Get input and output fonts from argv 2018-01-19 19:54:22 -05:00
README.md Get input and output fonts from argv 2018-01-19 19:54:22 -05:00

Ligaturizer

Add ligatures to any coding font!

This repo contains 2 things:

  1. Programming fonts with ligatures added (in output-fonts/), including:
  1. A fontforge python script (ligaturize.py) that adds the ligatures from Fira Code to a font without ligatures

Here's a couple examples of the fonts generated: SF Mono with ligatures (note the != and ->):

Credit This awesome script was written by IlyaSkriblovsky for adding ligatures to Deja Vu Sans Mono (dv-code-font). I made a few changes to generalize the script so that it works for any font, so that I could add ligatures to my favorite fonts.

Requirements

Using the Fonts: See the FiraCode README for a list of supported editors.

Script: This script requires FontForge python bindings. For Debian/Ubuntu they are available in python-fontforge package. For macOS, they are available via brew (brew install fontforge).

Using the Script

  1. Move/copy the font you want to ligaturize into input-fonts/ (or somewhere else convenient).
  2. Edit ligatures.py to disable any ligatures you don't want.
  3. Run the script: $ fontforge -lang=py ligaturize.py <INPUT> <OUTPUT>, e.g. $ fontforge -lang=py ligaturize.py input-fonts/Cousine-Regular.ttf output-fonts/CousineLigaturized-Regular.ttf

Misc.

For more awesome programming fonts with ligatures, check out:

  1. FiraCode
  2. Hasklig