Skip to content

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

Closed
Antyos/cascadios-code
#1

Description

@WindSoilder

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..

Activity

  1. aaronbell commented on Jun 7, 2021

    @aaronbell
    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).

  2. WindSoilder commented on Jun 8, 2021

    @WindSoilder
    Author

    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)

  3. aaronbell commented on Jun 8, 2021

    @aaronbell
    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.

  4. WindSoilder commented on Jun 8, 2021

    @WindSoilder
    Author

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

  5. aaronbell commented on Jun 16, 2021

    @aaronbell
    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!

  6. spaceaardvark commented on Jun 16, 2021

    @spaceaardvark

    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, Aaron (@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.

  7. WindSoilder commented on Jun 16, 2021

    @WindSoilder
    Author

    Space Aardvark (@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 Aaron (@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.

  8. spaceaardvark commented on Jun 17, 2021

    @spaceaardvark

    Wind (@WindSoilder) that doesn't fix the problem.

  9. aaronbell commented on Jul 13, 2021

    @aaronbell
    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

  10. WindSoilder commented on Jul 14, 2021

    @WindSoilder
    Author

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

  11. aaronbell commented on Jul 14, 2021

    @aaronbell
    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.

  12. WindSoilder commented on Jul 14, 2021

    @WindSoilder
    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
    
  13. aaronbell commented on Jul 14, 2021

    @aaronbell
    Collaborator

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

  14. aaronbell commented on Jul 14, 2021

    @aaronbell
    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?

  15. WindSoilder commented on Jul 14, 2021

    @WindSoilder
    Author

    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)

    图片

  16. aaronbell commented on Jul 15, 2021

    @aaronbell
    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.

  17. s1eke commented on Jul 15, 2021

    @s1eke

    Same problem on win11
    image

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

  18. WindSoilder commented on Jul 16, 2021

    @WindSoilder
    Author

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

  19. WindSoilder commented on Jul 16, 2021

    @WindSoilder
    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.

  20. aaronbell commented on Jul 16, 2021

    @aaronbell
    Collaborator
  21. avarayr commented on Aug 16, 2021

    @avarayr

    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

  22. added a commit that references this issue on Aug 26, 2021
    1c6def4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions