Terminal: Add preference to customize vertical line spacing

Created on 9 Nov 2019  路  15Comments  路  Source: microsoft/terminal

the space between lines is _way_ too large.

here's a comparison of the same block of text in terminal (top-left) and windows 10 command prompt (both bottom and right). the font is 'Lucida Console' in both programs.

the block on the bottom shows that the fonts are the same size (the width is the same).

the block on the right shows that the Terminal rendering is nearly 40% larger (blue arrow) than the Command Prompt rendering. That's 40% less text i can read without scrolling.

at the very least there needs to be an option to change the leading (that scales properly), although i'd recommend making it look like Command Prompt by default.

image

Area-Rendering Area-Settings Help Wanted Issue-Task Product-Terminal

Most helpful comment

Thanks for the suggestion! I could have _sworn_ there was already an issue for this, but it looks like it was only ever mentioned as a part of #1790 (and other threads), but never tracked individually. This is now the thread for _configurable line height / spacing_. Thanks!

All 15 comments

I think the top left line spacing is very readable, and preferable.

As long as the box and block drawing characters line up properly without gaps, then that is good.


Now if you are saying there should be an option to adjust the line spacing - again as long as box drawing characters line up properly - then sure add line spacing as an option.

Thanks for the suggestion! I could have _sworn_ there was already an issue for this, but it looks like it was only ever mentioned as a part of #1790 (and other threads), but never tracked individually. This is now the thread for _configurable line height / spacing_. Thanks!

Just wanted to hop in here and mention that while the config/preference would be nice, @Spongman might be seeing the effect of #455 (specifically #2779) happening here, if they're running with any "Display Scaling" in Windows.

nope, no display scaling going on.

just too much line spacing. you can see it in all the screenshots, too. so it's not just me.

Ah, ok. Fair.

I just figured it might have something to do with that. But yea, I agree that there's too much line spacing, regardless of display scaling settings.

It is exciting to see MS create a new terminal. Great work, I appreciate it.

+1 for the option to reduce spacing. Not a fan of reading double spaced lines and prefer smaller font too. Much more data can be presented in the given space.

Linux and Mac don't have such wide spacing and large fonts by default.

Linux and Mac don't have such wide spacing and large fonts by default.

btw: you can use CTRL+<Mouse Wheel> to change the font size.

Another side-effect of the default spacing is that, even in the intended Cascadia font box-drawing characters do not, er... tessellate the plane.

Edit: perhaps a better example:

image

Compare with the legacy conhost, in Courier New:

image

(Just FYI: you're reporting #455.)

Why it is not the same as in the classic cmd??
I cannot switch to the new terminal because of this (
I really rely on a number of visible lines on a screen in a few main cases.

I prefer taller, actually I want more taller. An option for line height (line spacing) is really good.

@zadjii-msft is an option to configure the "lineHeight" still something we'd be interested in including? If so, I'd be interested in having a go at implementing this :)

@zadjii-msft is an option to configure the "lineHeight" still something we'd be interested in including? If so, I'd be interested in having a go at implementing this :)

Does Windows Terminal draw it's own Box Drawing characters, I know it was proposed #5897 #455

If so, many of these will need to be adjusted to retain seamless lines and borders. But Full Block heights, should probably stay aligned to the text lines.

@jonhue absolutely, go ahead. @miniksa is the rendering guru - he might have some thoughts of things you should keep in mind, so I'll tag him in 鈽猴笍

@zadjii-msft is an option to configure the "lineHeight" still something we'd be interested in including? If so, I'd be interested in having a go at implementing this :)

@jonhue absolutely, go ahead. @miniksa is the rendering guru - he might have some thoughts of things you should keep in mind, so I'll tag him in 鈽猴笍

For all of this.... most of my notes on how/why line spacing is the way that it is lies in giant comments inside the DxEngine::_GetProposedFont method. Specific callouts include aligning the baseline to rest on a full pixel, ensuring that the cells continue to be a perfect integer pixel height, watching out for High DPI scaling, and looking around at anything referring to DWRITE_LINE_SPACING structures. I believe it's all set up in the base DxEngine class and the CustomTextLayout class pulls that information out and uses it for laying out the glyphs.

@zadjii-msft is an option to configure the "lineHeight" still something we'd be interested in including? If so, I'd be interested in having a go at implementing this :)

Does Windows Terminal draw it's own Box Drawing characters, I know it was proposed #5897 #455

If so, many of these will need to be adjusted to retain seamless lines and borders. But Full Block heights, should probably stay aligned to the text lines.

No, but it does scale the glyphs to fit perfectly inside a cell so there isn't gapping when the font is authored with a mismatch between the deprecated-windows-only line spacings and the line spacings the rest of the world uses (recent notes from Dustin in #7596). That's done in CustomTextLayout::s_CalculateBoxEffect. Might have to look in there too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

NickITGuy picture NickITGuy  路  3Comments

zadjii-msft picture zadjii-msft  路  3Comments

carlos-zamora picture carlos-zamora  路  3Comments

xmm1989218 picture xmm1989218  路  3Comments