Use prettify-symbols-mode to enable Iosevka ligatures for GNU Emacs

Recently, I switched back to GNU Emacs from emacs-mac-port1 for better performance. And there are 3 things that are missing from GNU Emacs but are supported by emacs-mac-port:

  1. Font Ligatures
  2. Emoji support
  3. org-protocol://, mailto:// link handling

This post is a summary for the way I used to enable font ligatures for GNU Emacs, based on the scripts2 provided by @mrkgnao.

  1. Install haskell if you haven't done it.

    brew cask install haskell-platform
    
  2. Run haskell repl

    ghci
    
  3. Generate parameters.toml and prettify-symbols-alist for latter Emacs configurations

    :load IosevkaConfigGen
    toToml
    toElisp
    
  4. Get/Clone Iosevka3 source code
  5. Append the contents in parameters.toml to Iosevka/parameters.toml
  6. Install Iosevka's dependencies

    brew install nodejs ttfautohint otfcc-mac64
    
  7. Build custom Iosevka

    npm install
    make custom-config
    make custom
    
  8. Set prettify-symbols-alist in your Emacs init files
  9. Enable prettify-symbols-mode

    (setq prettify-symbols-unprettify-at-point t)
    (global-prettify-symbols-mode +1)