microsoft / cascadia-code

This is a fun, new monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal.
Other
25.39k stars 803 forks source link

Can't enable stylistic set using otf files #530

Open patrickfatrick opened 3 years ago

patrickfatrick commented 3 years ago

Cascadia family version

2106.17

Cascadia family variant(s)

Cascadia Code (the version with ligatures)

Font file format(s)

.otf (static)

Platform

macOS 11.4

Other Software

Sublime Text build 4107

What happened?

I'm using Sublime, where stylistic sets are added like

{
  "font_options": ["ss01"],
}

However this does not work with the included otf files in cascadia code 2106.17. I confirmed this setting does work with a different font that also uses ss01 (fantasque sans mono).

attaching screenshot

Screen Shot 2021-07-13 at 11 42 05 AM
patrickfatrick commented 3 years ago

I'm not sure but is the "static" relevant here? Like these files don't include the style features? If so which files in the release should I be using?

aaronbell commented 3 years ago

This appears to be a limitation in Sublime Text.

Unlike Fantasque Sans Mono, The ss01 feature is only present in the italic form. In testing, I've found that Sublime Text checks if the ss01 feature is present in the base font ("Cascadia Code") and, not finding it, decides to ignore the feature entirely.

For example, if you change the "font_face" declaration to "Cascadia Code PL", suddenly everything works. If Sublime text doesn't update their text shaping (we'll see), it may be necessary to add an empty feature to Cascadia Code to ensure that something is found, even if empty.

aaronbell commented 3 years ago

For reference, I have opened a bug on the Sublime Text forum here: https://forum.sublimetext.com/t/font-options-ss01-does-not-work-if-not-in-regular-weight/59633

patrickfatrick commented 3 years ago

Gotcha, that's really interesting. Hopefully Sublime can fix it! Although knowing them it won't be anytime soon.

aaronbell commented 3 years ago

Yeah… that’s my concern :). I’ll probably add the empty features for the next version.

Sorry for the trouble!

patrickfatrick commented 3 years ago

No worries, keep up the good work! Love the font.

gmr458 commented 3 years ago

How can I enable stylistic set in Windows Terminal?

aaronbell commented 3 years ago

@gmr458 I don't believe there is a mechanism to do so at this time. See https://github.com/microsoft/terminal/issues/1790

patrickfatrick commented 1 year ago

any update to this? no traction on sublime side and cascadia code (as of 2111.01) still does not appear to have the stylistic set enabled for regular, such that the set works for the italic.

patrickfatrick commented 1 year ago

or is it something i can add myself for now?