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.75k stars 804 forks source link

Some Stylistic Sets and Alternates not Working #609

Closed ghost closed 2 years ago

ghost commented 2 years ago

Cascadia family version

2111.01

Cascadia family variant(s)

Cascadia Code (the version with ligatures)

Font file format(s)

.ttf (variable)

Platform

Windows 11

Other Software

VS Code 1.63.2

What happened?

After trying all possible combinations for stylistic alternates, figures, contextual alternates, and ligatures, ONLY 'zero' and regular ligatures (===, <=, !=, etc) work. Which means onum isn't working, ss0x isn't either, and obviously 'calt', true, or 'true' does nothing.

All font files have been tested at their most recent version. Tried uninstalling and reinstalling font files as well. Currently using variable weight version.

whojr01 commented 2 years ago

I just hit the same issue today in VS Code and my setup is:

Version: 1.63.2 (user setup) Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3 Date: 2021-12-15T09:40:02.816Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.14393

The font file I installed is: CascadiaCode.ttf

From this zip archive: CascadiaCode-2111.01.zip

Using this VS Code setting to set the font family which crashed VS CODE: "editor.fontFamily": "Cascadia Code", "editor.fontLigatures": true,

The problem is the font family is not correct. On windows to determine the correct font-family name I had to get properties/details

image

I used the title for the font-family in VS Code as follows and the ligatures showed up:

"editor.fontFamily": "Cascadia Code Regular", "editor.fontLigatures": true,

image

Hope this helps.

ghost commented 2 years ago

Thanks @whojr01! Unfortunately, that does not help. In fact, those ligatures (arrows, etc) are working. However, I cannot get the contextual alternates, old style figures, etc. to work.

I should also add that it is not a system limitation, since the same options work perfectly with other fonts (e.g., Fira Code).

whojr01 commented 2 years ago

Hi Nvsitr! I guess I miss understood your issue. I'm not too familiar with contextual alternatives. Have you tried the Cascadia Code PL file? It could be that they moved those alternatives from the Cascadia Code file.

In any case best of luck in getting your issue resolved.

On Mon, Dec 20, 2021 at 12:57 PM nvsitr @.***> wrote:

Thanks @whojr01 https://github.com/whojr01! Unfortunately, that does not help. In fact, those ligatures (arrows, etc) are working. However, I cannot get the contextual alternates, old style figures, etc. to work.

I should also add that it is not a system limitation, since the same options work perfectly with other fonts (e.g., Fira Code).

— Reply to this email directly, view it on GitHub https://github.com/microsoft/cascadia-code/issues/609#issuecomment-998148721, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGHWASP2TYFUZEHEMYRIVTUR5VBPANCNFSM5KL5M65A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

ghost commented 2 years ago

Yes, I have tried the Cascadia Code PL file... In fact, I tried all the Code files and could not get the contextual alternates/onums/stylistic sets to work. To be honest, I'd particularly like the old-style figures, but the stylistic sets would be a nice addition to them.

ghost commented 2 years ago

Just out of curiosity, I opened the Cascadia Code (variable weight) file in a font editor and noticed that it DOES NOT have the old-style figures—and, naturally, that isn't included in its lookup tables. I'd suggest developers to remove the "onum" feature on the main page, which shows: "editor.fontLigatures": "'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'zero', >>'onum'<<" I believe that would save you and users a lot of time and spare the headache of trying to sort out a problem that cannot be solved using the current version of the font.

EDIT. I've also found a solution and possible source of the problem: Windows Terminal uses Cascadia as its main font and one cannot remove old installed Cascadia versions without uninstalling Windows Terminal before. After doing that and installing the new files, stylistic sets were properly enabled.

aaronbell commented 2 years ago

That line of code is provided as an example of how to implement OT features in VS Code. The actual features available for use are documented in the "Stylistic Set" image that shows the alternate forms. Sorry that it was confusing to you.

ghost commented 2 years ago

That line of code is provided as an example of how to implement OT features in VS Code. The actual features available for use are documented in the "Stylistic Set" image that shows the alternate forms. Sorry that it was confusing to you.

What is mystifying is the use of a feature THAT IS NOT AVAILABLE as an example. How that can be an accurate way to show the implementation of a (supposedly) working line of code is beyond me.