JetBrains / JetBrainsMono

JetBrains Mono – the free and open-source typeface for developers
https://jetbrains.com/mono
SIL Open Font License 1.1
10.86k stars 301 forks source link

It appears intermediate weights less than 400 are inaccessible in VS Code on Big Sur #472

Closed aaronbell closed 1 year ago

aaronbell commented 3 years ago

I am tracking down a bug on Cascadia Code and noticed that JetBrains Mono appears to have a rendering issue in VS Code on Big Sur (macOS 11.4). Here's my settings in VS Code:

    "editor.fontFamily": "'JetBrains Mono', Menlo, Monaco, 'Courier New', monospace",
    "editor.fontWeight": 300,

This renders as:

Screen Shot 2021-07-14 at 11 38 42 PM

It appears to have the rendering of 100. There is no difference in weight anywhere between 100 and 300. At 400 it jumps up to the Regular weight.

Is this something you've encountered before? Can you repro it on your end?

Version: 1.58.1 (Universal)
Commit: 2aeda6b18e13c4f4f9edf6667158a6b8d408874b
Date: 2021-07-13T06:22:33.013Z (2 days 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
philippnurullin commented 3 years ago

Hi @aaronbell Thanks for reaching out! I will look in to it.

philippnurullin commented 3 years ago

What version of JB Mono you using?

philippnurullin commented 3 years ago

Reproduced with the latest version.

It also appear when using other fonts. Tested on Commisioner (non-variable), LeagueMonoVariable.

I had the similar issues when using font-weightsettings in CSS on variable fonts exported from Glyphs. The only way to fix that was using the actual numbers from the variable axis via: font-variation-settings: 'wght' 375;

aaronbell commented 3 years ago

Thanks for investigating! It sounds like this issue is at a higher level—maybe Chromium? I found that all of the fonts work fine on Mojave.

I’ll start a conversation with the folks at VS Code and see if they can better understand the source.

jyxjjj commented 3 years ago

Is there a font-weight list for it for web css? It's hardly for me to diff the name to font-weight.

philippnurullin commented 3 years ago

@jyxjjj Here is a table with CSS values compared to the font weight names https://docs.microsoft.com/en-us/typography/opentype/spec/os2#usweightclass

jyxjjj commented 3 years ago

Thanks. I wrote a php generator for JetBrains Mono CSS file just now. Github Gist Hash: 160caa47fb33a7e9bcf29c58b8fe30de