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

The different display between IDEs developed by JetBrains and VSCode #495

Closed clzoc closed 3 years ago

clzoc commented 3 years ago

system: windows10 21H1. cpu: AMD Ryzen 4800H.

I am grateful for authors of this project, it is actually a wonderful work. Usually, i use this font with VSCode and i am satisfied with the display. The pictures below show my settings and visual effect. (Note that it works well when only one kind of font weight had been installed in my windows system. If i install more than one kind of font weight, the width of the font become narrower and the glyph become more curved) Snipaste_2021-09-25_19-11-25 Snipaste_2021-09-25_19-06-22

Recently, i have used four IDEs developed by JetBrains include IDEA, CLion, GoLand and PyCharm. But their display with JetBrains Mono is different from VSCode. Snipaste_2021-09-25_18-59-17

I tried to reproduce the same visual effect in the IDEs developed by JetBrains but i failed. Almost, i intended to give up. However, few days ago, i installed JetBrains Mono NL Thin in my windows system and selected it as the font of editor, the display was really what i want. The width of the font become wider and the glyph become more straight. (According to my experiment, only NL and Thin font succeed,others failed) Snipaste_2021-09-25_18-58-51

I am not a advanced developer, so i am asking for help about my problem. I want to know the reason which is responsible for the different display.

Thank you.

yvvt0379 commented 3 years ago

Is your font size in your JetBrains IDEs same as that in VSCode?

alexeyten commented 3 years ago

Could be related to (or duplicate of) #38

Also it’s worth to see this comment https://github.com/JetBrains/JetBrainsMono/issues/142#issue-563844137

clzoc commented 3 years ago

Is your font size in your JetBrains IDEs same as that in VSCode?

Yes, the font size in both of them is 16.

clzoc commented 3 years ago

Could be related to (or duplicate of) #38

Also it’s worth to see this comment #142 (comment)

Thanks for your suggestion. I have followed the instruction of issue 142 by removing the bundled JetBrains Mono fonts manually and reinstalling the new version in OS but it seems that i failed. In fact, i prefer JetBrains Mono with wider word spacing and more straight glyph. In VSCode, the font becomes wider and more straight by installing only one kind of font weight in OS and setting "editor.fontWeight" to "bold". However, in JetBrains IDEs, only "JetBrainsMonoNL-Thin" the single font works as i expect, others such as "JetBrainsMonoNL-Regular", "JetBrainsMono-Thin" and "JetBrainsMono-Light" keep narrower word spacing and more curved glyph.

clzoc commented 3 years ago

Snipaste_2021-09-26_08-14-18

philippnurullin commented 3 years ago

Hi @clzoc

When you installing just one file/weight what is exact file you installing?

If you installing only the Regular weight and adding the "editor.fontWeight": "bold" this may deform letters. I'm not 100% sure how VSCode dealing with the situation but usually it is this:

Regarding the comparison of font rendering in VSCode and JB IDE. The font rendering is just different in different IDE. In the Thin version of the font space between letters usually increased because of the more thin strokes. And that creates more spacious rhythm that you like. We have a ticket about manual letter spacing. You con vote on it here → https://youtrack.jetbrains.com/issue/IDEA-131850

clzoc commented 3 years ago

Hi @clzoc

When you installing just one file/weight what is exact file you installing?

If you installing only the Regular weight and adding the "editor.fontWeight": "bold" this may deform letters. I'm not 100% sure how VSCode dealing with the situation but usually it is this:

  • IDE ses that there is no Bold font for this font-family is installed.
  • And it applies Synthetik Bold. It is a straight forward algorithm and as a result a lot of letter details vanishing in the process and the contour becomes different/bad if compared to drawn Bold weight. And you seem to like how it looks. Which is absolutely fine. To test this please send an image with font without "editor.fontWeight": "bold" applied.

Regarding the comparison of font rendering in VSCode and JB IDE. The font rendering is just different in different IDE. In the Thin version of the font space between letters usually increased because of the more thin strokes. And that creates more spacious rhythm that you like. We have a ticket about manual letter spacing. You con vote on it here → https://youtrack.jetbrains.com/issue/IDEA-131850

Thanks for your patience and professional answer. Now, i am convinced that "Synthetik Bold" is the reason of my question. What i hava installed in my PC is "JetBrainsMono-Light (version is 2.242)".

Without "editor.fontWeight": "bold" applied, the font rendering looks like the picture below. Snipaste_2021-09-27_17-14-00 In contrast, with "editor.fontWeight": "bold" applied, it looks like: Snipaste_2021-09-27_17-13-45

It seems that what i expect is a result of a lot of letter details vanishing, oh such a sad story. Finally, i would like to express my gratefulness to you again, byebye.

clzoc commented 3 years ago

Just one more question. I can't find enough information about the detail of "Synthetik Bold" algorithm. Is it possible for me to apply "Synthetik Bold" algorithm in some fonts manually under the assistance of software such as FontForge?

yvvt0379 commented 3 years ago

Maybe synthetic not synthetik?

clzoc commented 3 years ago

Maybe synthetic not synthetik?

much likely

philippnurullin commented 3 years ago

I wasn't referring to a particular The algorithm. But logic behind it will be something like this. Expand all the contours to +x. I suggest ask the VSCode team. Maybe someone can tell you in details how it works. Or maybe there is some free basic script for the FontForge that will modify the contour.