Programming ligatures revisited

Since version 1.40, Visual Studio Code allows fine-grained control over OpenType font features. Windows Terminal v1.11.2921.0 (pre-released in v1.11.2421.0) now allows the same. However, Cascadia Code has gone backwards (from a Haskell perspective). I decided to swap Fira Code for Cascadia Code.

Visual Studio Code

In Visual Studio Code’s settings.json:

cv02 turns on a variant of g. cv24 turns on a variant of /=. ss03 turns on a variant of &. ss05 turns on a variant of @. ss09 turns on a variant of >>= (as well as <<=, ||= and |=). zero turns on a variant of 0.

Windows Terminal

In Windows Terminal’s settings.json:

Crayon Syntax Higlighter

Fira Code is provided by the Google Fonts font delivery service. Initially, I used the WordPress add-on ‘Fonts Plugin | Google Fonts Typography’ to load the font without assigning it to an element. However, the font-feature-settings all appeared to be ignored. The beta version of the online Wakamai Fondue tool indicated that the only layout features used by the current Google Fonts version (version 5.002) were calt, dnom, frac, numr and wght. So, I reverted to using a local copy of the font, using the variable font version in WOFF2 format.

Adding the font to my fork of the WordPress plugin Crayon Syntax Highlighter involved creating the following file fira-code.css in wp-content/uploads/crayon-syntax-highlighter/fonts/:

This is my test: