Skip to content

How to enable stylistic sets

秋纫 edited this page Nov 19, 2019 · 27 revisions

Stylistic sets allow you to access additional, optional parts of the font on a per-feature basis. In Fira Code, they allow you to enable/disable alternative character variants.

Fira Code v2 supports these stylistic sets:

You can enable stylistic sets only if your editor supports it.

Atom

Go to Atom -> Stylesheet, add:

atom-text-editor {
  font-feature-settings: "ss01", "ss02", "ss03", "ss04", "ss05", "ss06", "zero", "onum";
}

Sublime Text

Go to Sublime Text -> Preferences -> Settings, add:

"font_options": ["ss01", "ss02", "ss03", "ss04", "ss05", "ss06", "ss19", "ss20"]

(for now Sublime Text does not allow you to specify zero and onum features, but they are repeated as ss19 and ss20.

VS Code

Since version 1.40, you can define in settings.json:

"editor.fontLigatures": "'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'zero', 'onum'"

To avoid possible bugs, you must uninstall Fira Code 1.x before installing Fira Code 2.0.

CSS

.monaco-editor {
  font-feature-settings: "ss01", "ss02", "ss03", "ss04", "ss05", "ss06", "zero", "onum";
}

Some Apple apps

Adobe apps, MS Word etc

https://www.macworld.com/article/3052388/how-to-access-advanced-opentype-features-in-a-variety-of-mac-apps.html

Baking in stylistic sets into the font file

This might be an option if your editor does not let you choose stylistic sets on the fly https://github.com/twardoch/fonttools-utils/tree/master/pyftfeatfreeze