Reputation: 182451
See October, 2019 Release Notes - stylistic sets.
Font feature settings
There is now more fine grained control over the font features. When configuring
"editor.fontLigatures": true
, VS Code would turn onliga
andcalt
. But some fonts have more settings, such as stylistic sets used by Fira Code.We now allow these font features to be explicitly controlled, for example:
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"[javascript]": { "editor.fontLigatures": "'ss02', 'ss19'", },
This is what stylistic sets can do. (See https://github.com/tonsky/FiraCode#stylistic-sets.)
I was already using Fira Code, so I thought I could download version 2 of the font and add the following lines to the editor settings.
"editor.fontFamily": "Fira Code",
"editor.fontLigatures":"'zero', 'ss02', 'ss03', 'ss04', 'ss05', 'calt'",
I was getting strange results: The zero style would work, but previously working ligatures stopped working; other sets didn't work at all.
How do I get Fira Code version 2 stylistic sets working in Visual Studio Code?
Upvotes: 7
Views: 7998
Reputation: 182451
I noticed that the stylistic sets would work better, but not perfectly, if I disabled this setting:
"editor.letterSpacing": 0.2,
I filed an issue with vscode, https://github.com/microsoft/vscode/issues/84018 where I learned that you should add the calt
set to your ligature settings ala
"editor.fontLigatures":"'zero', 'ss02', 'ss03', 'ss04', 'ss05', 'calt'",
Thanks to alexandrudima.
And then I noticed a number of people were having similar issues, https://github.com/microsoft/vscode/issues/84917
Two important points to get stylistic sets working:
In your OS font manager, uninstall older versions of Fira Code if you were using it before first, and then install Fira Code v2. And restarting the OS and vscode afterwards is probably necessary.
You will almost certainly need to add calt
to your list of whatever new sets you wish to use just to get other sets working.
Upvotes: 6