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

VSCode doesn't render variable font weights below 400 in Big Sur #128769

Closed
aaronbell opened this issue Jul 15, 2021 · 5 comments
Closed

VSCode doesn't render variable font weights below 400 in Big Sur #128769

aaronbell opened this issue Jul 15, 2021 · 5 comments
Assignees
Labels
chromium Issues and items related to Chromium font-rendering Font rendering issues macos-big-sur upstream-issue-pending Issues that are caused by chromium but have not been reported due to pending minimal repro

Comments

@aaronbell
Copy link

aaronbell commented Jul 15, 2021

Issue Type: Bug

In testing, I noted that, on macOS 11.4, VS Code will not render any variable instances less than 400. This issue can be repro'd with the latest version of JetBrains Mono, as well as other fonts (such as LeagueMonoVariable and Cascadia Code). See discussion here: JetBrains/JetBrainsMono#472

I've verified the issue also repros on https://vscode-web-test-playground.azurewebsites.net/

Interestingly, this issue does not repro on older versions of macOS such as Mojave, so it appears to be specific to the newer Big Sur OS.

It does appear that using the font-variation-settings CSS property (accessed via Developer Tools) instead works fine:
Screen Shot 2021-07-15 at 8 47 39 AM

This bug might be related to #128097

Version: 1.58.1 (Universal)
Commit: 2aeda6b18e13c4f4f9edf6667158a6b8d408874b
Date: 2021-07-13T06:22:33.013Z
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
@deepak1556
Copy link
Collaborator

This is tracked in upstream https://bugs.chromium.org/p/chromium/issues/detail?id=1100502

Originally reported in #100840 but since that issue is closed by the author will use this issue to track it.

@deepak1556 deepak1556 added chromium Issues and items related to Chromium font-rendering Font rendering issues macos-big-sur upstream-issue-linked This is an upstream issue that has been reported upstream labels Jul 17, 2021
@aaronbell
Copy link
Author

aaronbell commented Jul 17, 2021

@deepak1556 I’m not sure it is the same underlying issue as the ones you linked. Cascadia Code not JetBrians Mono do not contain embedded SVGs. Syntax colorization is working fine.

The issue here is in rendering of the font variation data via “font-weight”. In testing, the css property “font-variation-settings” renders correctly, but VS Code doesn’t use that property when setting font weight, even when the font is variable. So there’s definitely an upstream aspect of it but also fixes that VSCode can implement now to reduce the impact of this bug.

@deepak1556 deepak1556 added upstream-issue-pending Issues that are caused by chromium but have not been reported due to pending minimal repro and removed upstream-issue-linked This is an upstream issue that has been reported upstream labels Jul 17, 2021
@spaceaardvark
Copy link

The linked upstream issue has been merged into another issue that, like @aaronbell said, does not sound like the root cause at all. Please re-evaluate when you can. Thank you!

@spaceaardvark
Copy link

Workaround: Uninstall any Cascadia fonts and then install the static TTF version. In VS Code, specify the desired weight in the font family, e.g., "Cascadia Code Light" instead of just "Cascadia Code". Leave the font weight set to "normal".

@deepak1556
Copy link
Collaborator

Merging to #128097

@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chromium Issues and items related to Chromium font-rendering Font rendering issues macos-big-sur upstream-issue-pending Issues that are caused by chromium but have not been reported due to pending minimal repro
Projects
None yet
Development

No branches or pull requests

3 participants