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

gvim line height became noticeably bigger in 2.200 #334

Open
habamax opened this issue Oct 21, 2020 · 19 comments
Open

gvim line height became noticeably bigger in 2.200 #334

habamax opened this issue Oct 21, 2020 · 19 comments

Comments

@habamax
Copy link

habamax commented Oct 21, 2020

2.200

image

2.002

image

@philippnurullin
Copy link
Member

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

@mgieseki
Copy link

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

@habamax
Copy link
Author

habamax commented Oct 22, 2020

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

@philippnurullin
Copy link
Member

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.

@Zcowyzrg
Copy link

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!

@philippnurullin
Copy link
Member

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

@philippnurullin
Copy link
Member

philippnurullin commented Nov 2, 2020

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.

@habamax
Copy link
Author

habamax commented Nov 2, 2020

@philippnurullin yes, looks so much better!

@mgieseki
Copy link

mgieseki commented Nov 2, 2020

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

@philippnurullin
Copy link
Member

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?

@habamax
Copy link
Author

habamax commented Nov 2, 2020

@philippnurullin
image

@mgieseki
Copy link

mgieseki commented Nov 2, 2020

Here is another screenshot similar to my previous one above:

airline2

@philippnurullin
Copy link
Member

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

@Zcowyzrg
Copy link

Zcowyzrg commented Nov 2, 2020

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

@shabahengam
Copy link

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

@Zcowyzrg
Copy link

Zcowyzrg commented Nov 8, 2020

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? ;-)

@riskoviv
Copy link

riskoviv commented Nov 9, 2020

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%)

philippnurullin added a commit that referenced this issue Nov 9, 2020
— Vertical metrics (win, hhea, typo) made equal to prevent different line-height #334 #286
— Because of vertical metrics unification Vietnamese diacritics was made more compact in capital letters
— Added symbols □ △ ▽ ◁ ▷ ▻ ◅ ► ◄ ▪ ▫ ▴ ▾ ◂ ▸ ▵ ◃ ▹ ▿ ∘ ❮ ❯ ❰ ❱ ◌ ◯ ◎ ✕ ⚠ ⚡ ⌂ ◔ ◧ ◨ ◩ ◪ ◫ ⌄ ⌅ ◕ ⌥ ⌃ ⇧ ⌘ #277
— Added Bitcoin symbol #292
— Correction in Greek letters Θ ρ #336
@Noammac
Copy link

Noammac commented Nov 20, 2020

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.

@N-R-K
Copy link

N-R-K commented Mar 28, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants