JetBrains / JetBrainsMono

JetBrains Mono – the free and open-source typeface for developers

Home Page:https://jetbrains.com/mono

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gvim line height became noticeably bigger in 2.200

habamax opened this issue · comments

2.200

image

2.002

image

Looks like it is increased indeed. Here is discussion on how to manually make it smaller https://vi.stackexchange.com/questions/10043/how-to-change-the-space-between-lines-in-vim

The new line height also affects GVim's airline which is now higher so that the height of some special characters, like the left and right triangles, don't match any longer.

airline

Yep, I know how to workaround it in gvim with set linespace=-3. Was hoping this is font issue, not something 'by design'.

It's difficult matter. There is 4 groups of metrics in font that can be used as reference points when calculation the line-height in the rendering process. The only metrics became bigger in the 2.200 is the WinAscender. It was increased to match the height the character with Vietnamese diacritics (this was a part of the process to meet Google Fonts criteria). So i assume that is why line height increased in Vim but this thought needs testing and understanding what is exact algorithm used in Vim. It seems like a complicated task so it will take a while.

I can confirm the last usable font (for me) was the NL version 1.05:
image
You can see nicely continuous vertical lines.

Unfortunately, the regular, non-NL version is worse:
image

All the later versions from 1.06 and up to the current 2.200 are only getting worse, there's even more space between the lines.

I use the font on Windows with cmd.exe, Notepad++, Eclipse, putty - they all have the same issues with virtually no chance to correct it with settings.

PS. Kudos for the great font!

@Zcowyzrg Well this problem actually can be fixed fairly easy. I'll put in the list for the next release.

Ok, i pushed a demo fix. I will be grateful if you can test it.

  1. Install https://github.com/JetBrains/JetBrainsMono/blob/master/fonts/ttf/JetBrainsMonoDEV-Regular.ttf
  2. Select JetBrains Mono DEV
  3. See if it bring any change in lihe-height. The Boxdrawing may be wonky. Didn't corrected it to work with new line heights.

@philippnurullin yes, looks so much better!

I can confirm this as well, and even the airline characters fit nicely together now.
Thanks for your great work and the neat font.

Ok, Glad to hear! I'll include this fix in the next update then.

@mgieseki Can you share the screen with the Powerline example. I saw a nasty placement of triangles. Wonder if this if affected too?

Here is another screenshot similar to my previous one above:

airline2

Thanks, looking better! I'll add a bit overlapping to eliminate the gaps.

cmd.exe, NL-1.0.5:
image
cmd.exe, DEV (note weaker appearance, smaller font height, but the same line height)
image

Notepad++, NL-1.0.5, fits 42 lines in a window:
image
Notepad++, DEV, fits 39 lines in the same window:
image

I have 40 line in vim with ver 2.200 and 37 line with DEV version.
Left: DEV version ... Right: ver 2.200
xterm, fontsize 10
jet

I have just checked the 2.200 font on my linux box - and I don't have any issues with the font like I do on Windows. Both the "normal" and the "NL" versions have identical line height, box drawing characters have no gaps, no "weaker appearance" (which I presume is a scaling issue in Windows). I couldn't find any relevant general font metric that could contribute to the issues in Windows - ttfdump shows differences in head/xmin value (NL:-118, normal:-1740), but no (read: none that I could identify) differences in y or line height. Also checked in FontForge - all the font metrics displayed in font information dialogs are identical.
What the heck is wrong with Windows? ;-)

In VSCode on Windows 10 Pro (v2004), in version 2.200 symbols height became too high. But in 2.210 dev-version everything looks fine.
Here is comparison gif (at 200% size) with JavaScript code in VSCode at font size 13px of 4 versions of the font (1.0.2, 2.000, 2.200, 2.210):
1 0 2, 2 000, 2 200, 2 210 (200%)

Pulled today and found that my terminal has become significantly larger than expected. I managed to fix it by manually specifying line height to be 2px shorter.

commented

Updating from 2.001 to 2.242, I see the same issue. I lost about 4 whole vertical lines on my terminal...