Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How can I use only light and light italic by default in vscode? #500

Closed
WindSoilder opened this issue Jun 7, 2021 · 21 comments · Fixed by #538, emaballarin/cascadia-code#2 or Antyos/cascadios-code#1

Comments

@WindSoilder
Copy link

I have tried to build my self based on main branch, and I just allow CascadiaMono-Roman_Light and CascadiaMono-Italic_Light-Italic font in my font setting.
图片

图片

But I have issue to make use of them in vscode, all fonts in vscode is italic..
图片

If I enable CascadiaMono-Roman and CascadiaMono-Italic, this issue disappeared... But the weight is too high for me, so I just want to use a lighter version..

@aaronbell
Copy link
Collaborator

Ok, two things.

One is that you should use the PR that I submitted last week as that has necessary improvements to the name table (it should be pushed to main this week).

Two, it appears you’re trying to use the Variable font version of the fonts. So either you will need to set the font weight in VSCode to a lighter weight (say, 300), or switch to the stat instances (which the name table fix should help with).

@WindSoilder
Copy link
Author

WindSoilder commented Jun 8, 2021

Hi, thanks for your quickly reply :-)
But sorry it seems this doesn't working for me.

One is that you should use the PR that I submitted last week as that has necessary improvements to the name table (it should be pushed to main this week)

I have installed from this source. (I believe the code lays here: https://github.com/aaronbell/cascadia-code/tree/work)

Two, it appears you’re trying to use the Variable font version of the fonts. So either you will need to set the font weight in VSCode to a lighter weight (say, 300), or switch to the stat instances (which the name table fix should help with).

Here is the screenshort when no setting lighter weight:
图片

Here you can see that I'm using the source code from your PR (the italic font shape has changed.)

Here is another screenshort when setting lighter weight (everything goes into italic again):
图片


Oh, by the way, may I ask what's the meaning of salt or ss01 from here? #468 (comment) (I'm a big fan of this italic font version)

@aaronbell
Copy link
Collaborator

Can you zip up all of the fonts that you’re generating And attach them here so I can take a look at what might be going on?

As for salt / ss01, these are code functions in the font. See microsoft/vscode#80577 for how to implement these in VS Code.

@WindSoilder
Copy link
Author

Sure, here is the file.
ttf.tar.gz

@aaronbell
Copy link
Collaborator

Hi, sorry for the delay in getting back to you. Finally had a chance to take a look at the files you sent over and, honestly, I don't see anything wrong with them.

I suspect that the issue might end up being something related to font conflicts in your font cache. I'd suggest removing all Cascadia Code fonts from your system, restarting, then reinstalling. Also, potentially clear the font cache. Sorry for the trouble!

@spaceaardvark
Copy link

spaceaardvark commented Jun 16, 2021

I am seeing similar behavior with the latest release. If I set editor.fontWeight to "300", then everything is in italics. Is that what your PR is supposed to fix, @aaronbell? And thank you for your efforts!

Plot twist: Setting the font weight to anything other than 300 works fine. It's only 300 that makes everything italic.

@WindSoilder
Copy link
Author

WindSoilder commented Jun 16, 2021

@spaceaardvark Hi, would you please try to use the ttf I upload from here can solve your issue?

#500 (comment)

I have tried it again @aaronbell , it seems that it works on my windows machine, but failed in Mac machine, I will try to clear font cache in mac(If there is a cache) when I got it

After tried to clear cache, the problem still exists too.

Plot twist: Setting the font weight to anything other than 300 works fine. It's only 300 that makes everything italic.

Oh, I got the same behavior too.

@spaceaardvark
Copy link

@WindSoilder that doesn't fix the problem.

@aaronbell
Copy link
Collaborator

Hi! Please try the new release and let me know if it resolves your issues. Thanks!

https://github.com/microsoft/cascadia-code/releases/tag/v2106.17

@WindSoilder
Copy link
Author

Yeah, I'm using Mac, I have tried both otf and ttf, it seems that otf is ok, but ttf doesn't.

@aaronbell
Copy link
Collaborator

Out of interest, can you provide a bit more information about the system / VS Code version that you're using? I feel like this is likely a platform-specific issue but want to make sure.

@WindSoilder
Copy link
Author

System version: macOS Big Sur11.4

Vscode about information:

Version: 1.58.1
Commit: 2aeda6b18e13c4f4f9edf6667158a6b8d408874b
Date: 2021-07-13T06:22:33.013Z (20 hrs ago)
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Darwin x64 20.5.0

@aaronbell
Copy link
Collaborator

hmmmm. For fun, what happens if you set the font weight to 301.

@aaronbell
Copy link
Collaborator

Another thing I'd be interested for you to test out. Can you visit this site: https://vscode-web-test-playground.azurewebsites.net/ (ideally in Chrome)

Click the triple lines in the upper left File > Preferences > Settings and then enter in the code settings:

{
    "editor.fontFamily": "\"Cascadia Code\", Menlo, Monaco, 'Courier New', monospace",
    "editor.fontWeight": 300,
    "editor.tokenColorCustomizations": {
        "comments": {"fontStyle": "italic"}
    },
}

Does the issue repro there as well?

@WindSoilder
Copy link
Author

WindSoilder commented Jul 14, 2021

hmmmm. For fun, what happens if you set the font weight to 301.

Every is still italic.

Does the issue repro there as well?

Yeah, I can reproduct it. (In chrome)

图片

@aaronbell
Copy link
Collaborator

Good news bad news time!

Good news: This issue is isolated to Big Sur, it seems
Bad news: It is definitely something in the font because JetBrains Mono does not have the same problem
Good news: I have identified what is causing the issue and can fix it
Bad news: There appears to be a secondary issue that JetBrains Mono also suffers from wherein any weight value less than 400 becomes the lowest possible value (100 for JetBrains, 200 for Cascadia).

I will need to investigate further tomorrow.

@s1eke
Copy link

s1eke commented Jul 15, 2021

Same problem on win11
image

System Build:22000.65
VSCode Version:1.58.1
Cascadia Version:2106.17

This was referenced Jul 15, 2021
@WindSoilder
Copy link
Author

Thanks !.! I have checked the new build ttf in your pr, and it works!

@WindSoilder
Copy link
Author

Oh, by the way , I found that SemiLight weight value in your pr is 350, but I have tried to set weight to 350 in vscode, but vscode is still using Regular weight rather than SemiLight, I don't know if it's the vscode's issue.

@aaronbell
Copy link
Collaborator

See microsoft/vscode#128097

:/

@avarayr
Copy link

avarayr commented Aug 16, 2021

After some experimentation, I've found that In Vscode font-weight anything from 250 to 349 defaults to all-italic, including the whole number weight 300

I'm using variable TTF fonts on Mac OS Big Sur (11.5.2)

image

DHowett pushed a commit that referenced this issue Aug 26, 2021
## Summary of the Pull Request

This includes two fixes:
- [x] Closes #500 
Changes the build process to use gftools.stat instead of statmake. The issue was caused by an 'unused' italic axis in the fonts, which has been removed, but statmake gets unhappy without it there. So the process has been adjusted to a more amenable build library. 

- [x] Closes #552
Adds the Hebrew language tag to the Regular to ensure that Hebrew positioning works correctly. 

Also:
Adjusts calt feature to ensure LIG substitutions properly function under rare conditions where the `ignore` activate incorrectly. I thought this had already been PR'd but seems not. 

For example:
`===]`
First = becomes "equal_equal.liga", and ignore would activate on second =, blocking LIG from being substituted. If the liga form appears, LIG should appear.

Turned back on the =>> =<<, etc. ligatures as there is a glyph for them now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants