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

When Line Height is set to 1.4, there's an extra gap at the bottom #18582

Open
ni554n opened this issue Feb 16, 2025 · 2 comments
Open

When Line Height is set to 1.4, there's an extra gap at the bottom #18582

ni554n opened this issue Feb 16, 2025 · 2 comments
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.

Comments

@ni554n
Copy link

ni554n commented Feb 16, 2025

Windows Terminal version

1.21.10351.0

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

In Windows Terminal settings Defaults > Appearance page, set:

  1. Window Padding: 0
  2. Font face: JetBrains Mono
  3. Font size: 12
  4. Line height: 1.4
  5. Restart Terminal
  • My laptop display scaling is set to 125%

Expected Behavior

When Line height is set to 12, 13, or 15:

Image
Neovim

Actual Behavior

When Line height is set to 14:

Image
Neovim

@ni554n ni554n added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 16, 2025
@canh25xp
Copy link

I think this is normal behaviour, since the terminal must display a round number of lines, so if your screen height is not divisible by your font size, it gonna result in the last line being truncated. You can try and calculate your self:

First calculate the font height in pixel

font height =  12 * 4/3 * 1.4 * 1.2

Then divide your screen height by the font height:

number of lines = (screen height)/(font height)

Then compare with the actual buffer size of your terminal (you should do this in a full screen), assuming you using powershell:

$Host.UI.RawUI.BufferSize

Note the buffer height, this is the actual number of lines that your terminal can display

Width Height
----- ------
  160     50

@ni554n
Copy link
Author

ni554n commented Feb 17, 2025

Thanks for the detailed explanation. However, I'm confused about the terms used in the font height calculation.

font height =  12 * 4/3 * 1.4 * 1.2
font height =  font-size * display-aspect-ratio? * line-height * display-scaling-factor?

Additionally, my full-screen buffer size is:

Width Height
----- ------
  160     35

Through trial and error, I found that setting Startup > Launch Size Rows to 28 eliminates the gap. Any value above 28 (tested up to 38) results last line being truncated.

@carlos-zamora carlos-zamora added Product-Terminal The new Windows Terminal. Area-Windowing Window frame, quake mode, tearout and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 19, 2025
@carlos-zamora carlos-zamora added this to the Terminal v1.24 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants