Add preference to customize vertical line spacing #4885

Closed
opened 2026-01-30 23:59:06 +00:00 by claunia · 68 comments
Owner

Originally created by @Spongman on GitHub (Nov 9, 2019).

Originally assigned to: @lhecker on GitHub.

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

Originally created by @Spongman on GitHub (Nov 9, 2019). Originally assigned to: @lhecker on GitHub. 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](https://user-images.githubusercontent.com/1088194/68524038-55606a80-0276-11ea-9573-4fb57e439afc.png)
Author
Owner

@mdtauk commented on GitHub (Nov 9, 2019):

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.

@mdtauk commented on GitHub (Nov 9, 2019): 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.
Author
Owner

@zadjii-msft commented on GitHub (Nov 11, 2019):

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!

@zadjii-msft commented on GitHub (Nov 11, 2019): 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!
Author
Owner

@Rican7 commented on GitHub (Jan 15, 2020):

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.

@Rican7 commented on GitHub (Jan 15, 2020): 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.
Author
Owner

@Spongman commented on GitHub (Jan 22, 2020):

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.

@Spongman commented on GitHub (Jan 22, 2020): 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.
Author
Owner

@Rican7 commented on GitHub (Jan 22, 2020):

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.

@Rican7 commented on GitHub (Jan 22, 2020): 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.
Author
Owner

@Techtonictools commented on GitHub (Feb 1, 2020):

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.

@Techtonictools commented on GitHub (Feb 1, 2020): 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.
Author
Owner

@Spongman commented on GitHub (Feb 5, 2020):

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.

@Spongman commented on GitHub (Feb 5, 2020): > 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.
Author
Owner

@ethanherbertson commented on GitHub (May 5, 2020):

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

@ethanherbertson commented on GitHub (May 5, 2020): 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](https://user-images.githubusercontent.com/6392396/81116452-03c62f00-8eeb-11ea-8fb3-1fdcbe430866.png) Compare with the legacy conhost, in Courier New: ![image](https://user-images.githubusercontent.com/6392396/81116585-45ef7080-8eeb-11ea-9351-5835803bb82a.png)
Author
Owner

@DHowett-MSFT commented on GitHub (May 5, 2020):

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

@DHowett-MSFT commented on GitHub (May 5, 2020): (Just FYI: you're reporting #455.)
Author
Owner

@Inversion-des commented on GitHub (Jul 14, 2020):

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.

@Inversion-des commented on GitHub (Jul 14, 2020): 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.
Author
Owner

@markwu commented on GitHub (Sep 3, 2020):

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

@markwu commented on GitHub (Sep 3, 2020): I prefer taller, actually I want more taller. An option for line height (line spacing) is really good.
Author
Owner

@jonhue commented on GitHub (Nov 9, 2020):

@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 commented on GitHub (Nov 9, 2020): @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 :)
Author
Owner

@mdtauk commented on GitHub (Nov 9, 2020):

@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.

@mdtauk commented on GitHub (Nov 9, 2020): > @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.
Author
Owner

@zadjii-msft commented on GitHub (Nov 9, 2020):

@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 commented on GitHub (Nov 9, 2020): @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 ☺️
Author
Owner

@miniksa commented on GitHub (Nov 9, 2020):

@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.

@miniksa commented on GitHub (Nov 9, 2020): > @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.
Author
Owner

@tarkah commented on GitHub (Feb 19, 2021):

+1 This is a huge problem with TUI applications, especially ones that leverage things like braille characters to render graphs.

Here's an example of Consolas 11pt in Windows Terminal vs Alacritty that shows the issue very well. I'm assuming this is do to line spacing...

Windows Terminal Alacritty
image image
image image
@tarkah commented on GitHub (Feb 19, 2021): +1 This is a huge problem with TUI applications, especially ones that leverage things like braille characters to render graphs. Here's an example of Consolas 11pt in Windows Terminal vs Alacritty that shows the issue very well. I'm assuming this is do to line spacing... | Windows Terminal | Alacritty | | - | - | | ![image](https://user-images.githubusercontent.com/10239377/108550454-739f7d80-72a3-11eb-901b-8604f3fdf3ec.png) | ![image](https://user-images.githubusercontent.com/10239377/108550472-79955e80-72a3-11eb-9ef0-4abb1b39dfbc.png) | | ![image](https://user-images.githubusercontent.com/10239377/108550568-96ca2d00-72a3-11eb-9a6a-7e437eab34a7.png) | ![image](https://user-images.githubusercontent.com/10239377/108550577-9a5db400-72a3-11eb-9892-1b58d071ea08.png) |
Author
Owner

@zadjii-msft commented on GitHub (Feb 19, 2021):

@tarkah woah, what is that application? That's the prettiest looking commandline stock tracker I've ever seen 👀 /cc @miniksa because this is like, both of his favorite things

@zadjii-msft commented on GitHub (Feb 19, 2021): @tarkah woah, what is that application? That's the prettiest looking commandline stock tracker I've ever seen 👀 /cc @miniksa because this is like, both of his favorite things
Author
Owner

@DHowett commented on GitHub (Feb 19, 2021):

(If this were due to the line spacing, I would expect the actual lines to be spaced differently. This just looks like an issue with the size of the braille characters.)

@DHowett commented on GitHub (Feb 19, 2021): (If this were due to the line spacing, I would expect the actual lines to be spaced differently. This just looks like an issue with the size of the braille characters.)
Author
Owner

@tarkah commented on GitHub (Feb 19, 2021):

@zadjii-msft Thanks! It's a TUI app I made in Rust https://github.com/tarkah/tickrs

@tarkah commented on GitHub (Feb 19, 2021): @zadjii-msft Thanks! It's a TUI app I made in Rust https://github.com/tarkah/tickrs
Author
Owner

@tarkah commented on GitHub (Feb 19, 2021):

@DHowett Good point, the windows terminal frame is 36 lines tall vs the alacritty is 38 lines tall, but it's hard to know if that's primarily due to the window decoration or any line spacing.

Windows Terminal Alacritty
image image

The spacing between the braille characters seems much tighter in Windows Terminal vs Alacritty, so maybe this is a different issue.

@tarkah commented on GitHub (Feb 19, 2021): @DHowett Good point, the windows terminal frame is 36 lines tall vs the alacritty is 38 lines tall, but it's hard to know if that's primarily due to the window decoration or any line spacing. | Windows Terminal | Alacritty | | - | - | | ![image](https://user-images.githubusercontent.com/10239377/108553064-04c42380-72a7-11eb-840b-bb27d46c09b4.png) | ![image](https://user-images.githubusercontent.com/10239377/108553087-0beb3180-72a7-11eb-9273-8db556616f83.png) | The spacing between the braille characters seems much tighter in Windows Terminal vs Alacritty, so maybe this is a different issue.
Author
Owner

@DHowett commented on GitHub (Feb 19, 2021):

Weird question- how does it look if you use Cascadia Mono? I wonder if Consolas doesn't actually have those characters and Terminal is squashing them to fit when they come from a fallback font while Alacritty is not? Are are guilty of squashing "big" characters, afterall...

@DHowett commented on GitHub (Feb 19, 2021): Weird question- how does it look if you use Cascadia Mono? I wonder if Consolas _doesn't actually have those characters_ and Terminal is squashing them to fit when they come from a fallback font while Alacritty is not? Are are guilty of squashing "big" characters, afterall...
Author
Owner

@tarkah commented on GitHub (Feb 19, 2021):

No real difference.

Consolas Cascadia Mono PL
image image

Interestingly, Cascadia Mono renders worse than Consolas in Alacritty...

Consolas Cascadia Mono PL
image image
@tarkah commented on GitHub (Feb 19, 2021): No real difference. | Consolas | Cascadia Mono PL | | - | - | | ![image](https://user-images.githubusercontent.com/10239377/108554081-72248400-72a8-11eb-850f-e59e3aca3ebc.png) | ![image](https://user-images.githubusercontent.com/10239377/108554131-8072a000-72a8-11eb-99a5-e3ba808fcd8e.png) | Interestingly, Cascadia Mono renders worse than Consolas in Alacritty... | Consolas | Cascadia Mono PL | | - | - | | ![image](https://user-images.githubusercontent.com/10239377/108554545-13133f00-72a9-11eb-8096-8af8ab4dd138.png) | ![image](https://user-images.githubusercontent.com/10239377/108554564-1a3a4d00-72a9-11eb-8307-adb57b4fe125.png) |
Author
Owner

@tarkah commented on GitHub (Feb 19, 2021):

Alacritty has a line spacing offset option:

  # Offset is the extra space around each character. `offset.y` can be thought of
  # as modifying the line spacing, and `offset.x` as modifying the letter spacing.
  offset:
    x: 0
    y: -1

I need to set it to -1 to get perfect rendering of the braille characters. I can make it look closer to windows terminal by increasing it, but then notice how it affects other characters like the borders. I'm thinking you're right about how they're getting "squished" in windows terminal.

-1 offset 5 offset
image image
@tarkah commented on GitHub (Feb 19, 2021): Alacritty has a line spacing offset option: ``` # Offset is the extra space around each character. `offset.y` can be thought of # as modifying the line spacing, and `offset.x` as modifying the letter spacing. offset: x: 0 y: -1 ``` I need to set it to -1 to get perfect rendering of the braille characters. I can make it look closer to windows terminal by increasing it, but then notice how it affects other characters like the borders. I'm thinking you're right about how they're getting "squished" in windows terminal. | -1 offset | 5 offset | | - | - | | ![image](https://user-images.githubusercontent.com/10239377/108554836-874de280-72a9-11eb-9563-d42dde7f291f.png) | ![image](https://user-images.githubusercontent.com/10239377/108554974-b1070980-72a9-11eb-80e0-68f9b5ba3ac5.png) |
Author
Owner

@Spongman commented on GitHub (Feb 19, 2021):

the thing i don't quite understand is this: Command Prompt uses ttf fonts, and renders box-drawing characters just fine. why is it that Terminal has this issue where box-drawing characters are taller than normal and there's an extra vertical space in between lines?

@Spongman commented on GitHub (Feb 19, 2021): the thing i don't quite understand is this: Command Prompt uses ttf fonts, and renders box-drawing characters just fine. why is it that Terminal has this issue where box-drawing characters are taller than normal and there's an extra vertical space in between lines?
Author
Owner

@DHowett commented on GitHub (Feb 19, 2021):

@spongman the old Windows Console Host (thing that CMD/powershell run inside) uses legacy font measurements that have been deprecated for about 20 years. Unfortunately, typography has moved on since it was authored. Terminal uses the "correct" (this is debatable, but they are correct insofar as they are the values specified by the font designer!) design metrics.

@DHowett commented on GitHub (Feb 19, 2021): @spongman the old Windows Console Host (thing that CMD/powershell run inside) uses legacy font measurements that have been deprecated for about 20 years. Unfortunately, typography has moved on since it was authored. Terminal uses the "correct" (this is debatable, but they are correct insofar as they are the values specified by the font designer!) design metrics.
Author
Owner

@Spongman commented on GitHub (Feb 19, 2021):

that's lovely to hear. so, can we get an option to use the old, broken, whatever font metrics? because the new ones suck.

@Spongman commented on GitHub (Feb 19, 2021): that's lovely to hear. so, can we get an option to use the old, broken, whatever font metrics? because the new ones suck.
Author
Owner

@DHowett commented on GitHub (Feb 19, 2021):

No. You're going to get configurable line spacing, like you asked for in https://github.com/microsoft/terminal/issues/3498#issue-520343001.

@DHowett commented on GitHub (Feb 19, 2021): No. You're going to get configurable line spacing, like you asked for in https://github.com/microsoft/terminal/issues/3498#issue-520343001.
Author
Owner

@Spongman commented on GitHub (Feb 19, 2021):

so, what's the difference between what you say "correct" design metrics, fudged to fix box-drawing, and then fudged again to allow for configurable line-height, and whatever it was that conhost does?

@Spongman commented on GitHub (Feb 19, 2021): so, what's the difference between what you say "correct" design metrics, fudged to fix box-drawing, and then fudged again to allow for configurable line-height, and whatever it was that conhost does?
Author
Owner

@miniksa commented on GitHub (Feb 19, 2021):

The problem we're having here is biasing toward a perfect pixel cell grid, where each piece of the grid has an integer number of pixels in both the X and Y dimensions.

The primary reason for this is performance: if we can redraw only on an exact pixel boundary as characters change, then we can save ourselves from having to redraw the neighbors or the entire screen.

Does that come with compromises? Yes.

One of those compromises is that we calculate the perfect pixel width in the X dimension and then add line spacing in the Y dimension to round it out to a whole, non-fractional pixel.

One additional reason for some of the spacing has to do with something we were told by multiple typography experts inside and outside the company: the baseline of characters should sit perfectly on a pixel boundary for the crispest representation. Does someone disagree with this? Probably. Can you find another expert to disagree? Also probably. Do we try to rely on the knowledge of our peers and colleagues when we don't know what's up? Yes.

Is this different from what Conhost did? Yes. Why? Conhost used GDI. We use DirectX. Why don't we use GDI for Terminal? Because it's old and significantly less configurable and doesn't run on the GPU. Performance and configurability are key goals of ours. We also like using supported and forward-looking tech to build new code when possible. DirectWrite/DirectX fits that bucket.

So how did GDI get up into getting this to all work on perfect pixel box grids with the same font? To be honest, I'm not sure. Perhaps they decided to bias in a different direction like on character width. Perhaps because it's old code, it was simply a rounding or truncating-to-integers error that I haven't been able to replicate in the float-based DirectWrite world yet.

Will we do better in the future? Yes.

If we find a more suitable default or expert, will we change our rendering to accommodate? Yes.

When we have time and cycles, will we let people adjust the knobs on this too so they can choose the perfect rendering fidelity for themselves, even if it sacrifices some of the performance? Yes. Why is this taking so long? Because I'm probably the right person on the team to do it and my general productivity, mood, and physical/mental health are all still suffering significantly with the pandemic. Please be patient with us/me.

Because this is the internet, will someone try to prove me wrong and show me the correct union of correctness and performance for DirectWrite? I sure hope so, but it's a solid maybe.

In the mean time, @tarkah, your finance graph thing is super cool. I might keep it up in a tab to MSFT and VTI. :P I nerfed the line spacing quickly/temporarily to reduce the impact of our calculations on the drawing and it still didn't look right in my dev build. And I tried applying the box scaling effect to it and it still looked wrong. Not quite sure why, but I have other things on the agenda today so that's all I can do for now.

@miniksa commented on GitHub (Feb 19, 2021): The problem we're having here is biasing toward a perfect pixel cell grid, where each piece of the grid has an integer number of pixels in both the X and Y dimensions. The primary reason for this is performance: if we can redraw only on an exact pixel boundary as characters change, then we can save ourselves from having to redraw the neighbors or the entire screen. Does that come with compromises? Yes. One of those compromises is that we calculate the perfect pixel width in the X dimension and then add line spacing in the Y dimension to round it out to a whole, non-fractional pixel. One additional reason for some of the spacing has to do with something we were told by multiple typography experts inside and outside the company: the baseline of characters should sit perfectly on a pixel boundary for the crispest representation. Does someone disagree with this? Probably. Can you find another expert to disagree? Also probably. Do we try to rely on the knowledge of our peers and colleagues when we don't know what's up? Yes. Is this different from what Conhost did? Yes. Why? Conhost used GDI. We use DirectX. Why don't we use GDI for Terminal? Because it's old and significantly less configurable and doesn't run on the GPU. Performance and configurability are key goals of ours. We also like using supported and forward-looking tech to build new code when possible. DirectWrite/DirectX fits that bucket. So how did GDI get up into getting this to all work on perfect pixel box grids with the same font? To be honest, I'm not sure. Perhaps they decided to bias in a different direction like on character width. Perhaps because it's old code, it was simply a rounding or truncating-to-integers error that I haven't been able to replicate in the float-based DirectWrite world yet. Will we do better in the future? Yes. If we find a more suitable default or expert, will we change our rendering to accommodate? Yes. When we have time and cycles, will we let people adjust the knobs on this too so they can choose the perfect rendering fidelity for themselves, even if it sacrifices some of the performance? Yes. Why is this taking so long? Because I'm probably the right person on the team to do it and my general productivity, mood, and physical/mental health are all still suffering significantly with the pandemic. Please be patient with us/me. Because this is the internet, will someone try to prove me wrong and show me the correct union of correctness and performance for DirectWrite? I sure hope so, but it's a solid maybe. In the mean time, @tarkah, your finance graph thing is super cool. I might keep it up in a tab to MSFT and VTI. :P I nerfed the line spacing quickly/temporarily to reduce the impact of our calculations on the drawing and it still didn't look right in my dev build. And I tried applying the box scaling effect to it and it still looked wrong. Not quite sure why, but I have other things on the agenda today so that's all I can do for now.
Author
Owner

@tarkah commented on GitHub (Feb 19, 2021):

@miniksa That's exactly why I created it, to keep a tab on things in the far corner of the screen :)

Thanks for taking a quick look into it. Appreciate all you and the team have done to make this awesome terminal for Windows!

@tarkah commented on GitHub (Feb 19, 2021): @miniksa That's exactly why I created it, to keep a tab on things in the far corner of the screen :) Thanks for taking a quick look into it. Appreciate all you and the team have done to make this awesome terminal for Windows!
Author
Owner

@Spongman commented on GitHub (Feb 23, 2021):

@miniksa thanks for the explanation, but i still have one question: are you saying that, since conhost uses GDI, its font rendering doesn't align on pixel boundaries? because that doesn't (err) align with what i'm seeing.

here's a screenshot of conhost (winver: 10.0.19042.746), rendering Lucida Console 'size' 12, the same settings as the screenshots in comment 1, above:

image

if you load that into paint.net and blow it up you'll see that each row is identical to the next. maybe the baseline doesn't align exactly with the pixel boundary, but whatever offset there is it's the same for each row, so it looks like it's using an whole-pixel line-height. and maybe it's an accident, but if GDI isn't aligning the baseline on a pixel boundary, it's still doing a pretty good job of making up for it, for example: all the pixels highlighted in red here are 0x000000 on every row:

image

maybe the DirectX font rendering code doesn't do as good a job as GDI when the baseline isn't precisely on a pixel boundary. that would be interesting to see.

or... maybe conhost is using pixel-aligned baselines and yet still able to render without the additional vertical whitespace. maybe someone with access to the conhost source code could answer that?

@Spongman commented on GitHub (Feb 23, 2021): @miniksa thanks for the explanation, but i still have one question: are you saying that, since conhost uses GDI, its font rendering doesn't align on pixel boundaries? because that doesn't (err) align with what i'm seeing. here's a screenshot of conhost (winver: 10.0.19042.746), rendering Lucida Console 'size' 12, the same settings as the screenshots in comment 1, above: ![image](https://user-images.githubusercontent.com/1088194/108909814-e2e5dc00-75d9-11eb-9744-21e186d76f03.png) if you load that into paint.net and blow it up you'll see that each row is identical to the next. maybe the baseline doesn't align exactly with the pixel boundary, but whatever offset there is it's the same for each row, so it looks like it's using an whole-pixel line-height. and maybe it's an accident, but if GDI isn't aligning the baseline on a pixel boundary, it's still doing a pretty good job of making up for it, for example: all the pixels highlighted in red here are 0x000000 on every row: ![image](https://user-images.githubusercontent.com/1088194/108909950-10328a00-75da-11eb-81cf-77a4af581d2b.png) maybe the DirectX font rendering code doesn't do as good a job as GDI when the baseline isn't precisely on a pixel boundary. that would be interesting to see. or... maybe conhost _is_ using pixel-aligned baselines and yet still able to render without the additional vertical whitespace. maybe someone with access to the conhost source code could answer that?
Author
Owner

@DHowett commented on GitHub (Feb 23, 2021):

someone with access to the conhost source code could answer that

I've got good news! That's this whole repository. Terminal and conhost share like 80% of their code, and the full living source for conhost is in here too. 😄

@DHowett commented on GitHub (Feb 23, 2021): > someone with access to the conhost source code could answer that I've got good news! That's this whole repository. Terminal and conhost share like 80% of their code, and the full living source for conhost is in here too. :smile:
Author
Owner

@miniksa commented on GitHub (Feb 24, 2021):

or... maybe conhost is using pixel-aligned baselines and yet still able to render without the additional vertical whitespace. maybe someone with access to the conhost source code could answer that?

No, you see, conhost doesn't have the choice. It just shunts it all over to GDI and GDI makes super opaque choices without asking us any further.

DirectWrite, on the other hand, gives us all of the choices in the world and also does all its math in floats the whole way up and down. Sometimes we're forced to make choices in DirectWrite that have no default where GDI would have just picked something for us. Those are the sorts of things that I think are giving us the variation.

@miniksa commented on GitHub (Feb 24, 2021): > or... maybe conhost _is_ using pixel-aligned baselines and yet still able to render without the additional vertical whitespace. maybe someone with access to the conhost source code could answer that? No, you see, conhost doesn't have the choice. It just shunts it all over to GDI and GDI makes super opaque choices without asking us any further. DirectWrite, on the other hand, gives us all of the choices in the world and also does all its math in floats the whole way up and down. Sometimes we're forced to make choices in DirectWrite that have no default where GDI would have just picked something for us. Those are the sorts of things that I think are giving us the variation.
Author
Owner

@Spongman commented on GitHub (Feb 24, 2021):

yeah, sorry, maybe my comment wasn't clear enough. my question is still: if GDI is constrained how come it can still render good-looking text AND, at the same, render text without the vertical space?

@Spongman commented on GitHub (Feb 24, 2021): yeah, sorry, maybe my comment wasn't clear enough. my question is still: if GDI is constrained how come it can still render good-looking text AND, at the same, render text without the vertical space?
Author
Owner

@miniksa commented on GitHub (Feb 24, 2021):

yeah, sorry, maybe my comment wasn't clear enough. my question is still: if GDI is constrained how come it can still render good-looking text AND, at the same, render text without the vertical space?

A mystery I do not understand yet. I hope to get time to spelunk the inside of GDI and DirectWrite's code, solve it in Terminal against DirectWrite, and reveal the answer to the world at some point.

@miniksa commented on GitHub (Feb 24, 2021): > yeah, sorry, maybe my comment wasn't clear enough. my question is still: if GDI is constrained how come it can still render good-looking text AND, at the same, render text without the vertical space? A mystery I do not understand yet. I hope to get time to spelunk the inside of GDI and DirectWrite's code, solve it in Terminal against DirectWrite, and reveal the answer to the world at some point.
Author
Owner

@rbeesley commented on GitHub (Mar 26, 2021):

@Spongman, I'd be curious how things look with antialiasing turned off. It also looks like you have ClearType enabled, rather than grayscale. It would also be worth knowing if you have any DPI scaling on that monitor. Last time I looked at it ClearType was being applied before any DPI scaling, and maybe true of grayscale too, meaning that these are all factors which might come into play.

Considering that the GDI font rendering pipeline was written along side any of the antialiasing and early DPI adjustments, and the DirectX pipeline was more about making games look good. Crisp text in a game may actually be less desirable than being sightly offset to make text look smoother and leveraging antialiasing... an artifact of the past which has carried over to other applications of the technology.

But this is just speculation on my part.

@rbeesley commented on GitHub (Mar 26, 2021): @Spongman, I'd be curious how things look with antialiasing turned off. It also looks like you have ClearType enabled, rather than grayscale. It would also be worth knowing if you have any DPI scaling on that monitor. Last time I looked at it ClearType was being applied _before_ any DPI scaling, and maybe true of grayscale too, meaning that these are all factors which might come into play. Considering that the GDI font rendering pipeline was written along side any of the antialiasing and early DPI adjustments, and the DirectX pipeline was more about making games look good. Crisp text in a game may actually be less desirable than being sightly offset to make text look smoother and leveraging antialiasing... an artifact of the past which has carried over to other applications of the technology. But this is just speculation on my part.
Author
Owner

@SidWorks commented on GitHub (Apr 21, 2021):

@miniksa Any update on line spacing part?

@SidWorks commented on GitHub (Apr 21, 2021): @miniksa Any update on line spacing part?
Author
Owner

@SidWorks commented on GitHub (Apr 21, 2021):

With use of padding I made it look like VSCODE Zen Mode
image
With an option of line-Spacing, it will be perfect.

@SidWorks commented on GitHub (Apr 21, 2021): With use of padding I made it look like VSCODE Zen Mode ![image](https://user-images.githubusercontent.com/51191127/115502235-37cc6880-a292-11eb-8a7a-ab97316269e3.png) With an option of line-Spacing, it will be perfect.
Author
Owner

@zadjii-msft commented on GitHub (Apr 21, 2021):

Any update on line spacing part?

Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button?
image
That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

@zadjii-msft commented on GitHub (Apr 21, 2021): > Any update on line spacing part? Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button? ![image](https://user-images.githubusercontent.com/18356694/91237459-5cbb0c80-e700-11ea-9347-b9b1ec2813b1.png) That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️
Author
Owner

@ffflick-gh commented on GitHub (Aug 31, 2021):

+1 to customizing line height.

The current line spacing for me is smaller compared to the original windows console, and it makes for some very awkward TUIs. It's quite inconvenient since many people use terminal-based editors for a lot of their work.

Original Windows Console:
Screenshot 2021-08-31 132208

Windows Terminal:
Screenshot 2021-08-31 131841

It's especially worse in fullscreen/focus mode.

@ffflick-gh commented on GitHub (Aug 31, 2021): +1 to customizing line height. The current line spacing for me is smaller compared to the original windows console, and it makes for some very awkward TUIs. It's quite inconvenient since many people use terminal-based editors for a lot of their work. Original Windows Console: ![Screenshot 2021-08-31 132208](https://user-images.githubusercontent.com/28828855/131446677-f086dd0d-2be2-4e88-9b14-b62209dad9f0.png) Windows Terminal: ![Screenshot 2021-08-31 131841](https://user-images.githubusercontent.com/28828855/131446707-8e604f29-8279-4c59-b0d3-ca28f9cf963c.png) It's especially worse in fullscreen/focus mode.
Author
Owner

@Spongman commented on GitHub (Dec 12, 2021):

You’d have thought that > 100 votes and 2 years would be enough… but no.

@Spongman commented on GitHub (Dec 12, 2021): You’d have thought that > 100 votes and 2 years would be enough… but no.
Author
Owner

@joakin commented on GitHub (Dec 12, 2021):

I’ve had to learn fontforge and how to adjust fonts to have higher fixed
dimensions to be able to use windows terminal 😂

@joakin commented on GitHub (Dec 12, 2021): I’ve had to learn fontforge and how to adjust fonts to have higher fixed dimensions to be able to use windows terminal 😂
Author
Owner

@zadjii-msft commented on GitHub (Dec 13, 2021):

You’d have thought that > 100 votes and 2 years would be enough… but no.

Sorry about that, there are just a few (40) things higher on the priority list: https://github.com/microsoft/terminal/issues?q=is%3Aissue+sort%3Areactions-%2B1-desc+

We'd absolutely welcome a PR though! There's this great font object we introduced to the settings a few releases ago, that's the prefect place for someone to stick a setting to configure this. The only bit that's tricky is actually changing the line spacing with DirectWrite. I dunno how to do that, but I'm sure it's probably trivial (maybe this?). I'm just not the DWrite expert 😅. Then it's just a matter of plumbing the setting through TerminalSettings -> TermControl/ControlCore -> DxEngine, and presto!

@zadjii-msft commented on GitHub (Dec 13, 2021): > You’d have thought that > 100 votes and 2 years would be enough… but no. Sorry about that, there are just a few (40) things higher on the priority list: https://github.com/microsoft/terminal/issues?q=is%3Aissue+sort%3Areactions-%2B1-desc+ We'd absolutely welcome a PR though! There's this great `font` object we introduced to the settings a few releases ago, that's the prefect place for someone to stick a setting to configure this. The only bit that's tricky is actually changing the line spacing with DirectWrite. I dunno how to do that, but I'm sure it's probably trivial (maybe [this](https://docs.microsoft.com/en-us/windows/win32/api/dwrite_3/ns-dwrite_3-dwrite_line_spacing)?). I'm just not the DWrite expert 😅. Then it's just a matter of plumbing the setting through `TerminalSettings` -> `TermControl`/`ControlCore` -> `DxEngine`, and presto!
Author
Owner

@mdtauk commented on GitHub (Dec 13, 2021):

If line spacing becomes an option, it should probably be introduced hand in hand with allowing Terminal to draw the block drawing glyphs, to prevent "UI" elements from showing gaps when they are intended to be flush with full character heights and widths.

@mdtauk commented on GitHub (Dec 13, 2021): If line spacing becomes an option, it should probably be introduced hand in hand with allowing Terminal to draw the block drawing glyphs, to prevent "UI" elements from showing gaps when they are intended to be flush with full character heights and widths.
Author
Owner

@zadjii-msft commented on GitHub (Dec 13, 2021):

it should probably be introduced hand in hand

I'm gonna play devil's advocate: I don't think the two are strongly linked. I'd rather have incremental progress rather than entirely block some goodness (line spacing) because we couldn't figure out a hard thing (block drawing). So I'd happily welcome PRs for both things, independently. If someone is motivated to try and fix this, they shouldn't feel worried about needing to also solve box drawing. (Of course, if they want to, they're welcome to!)

(for linking: #5897)

@zadjii-msft commented on GitHub (Dec 13, 2021): > it should probably be introduced hand in hand I'm gonna play devil's advocate: I don't think the two are strongly linked. I'd rather have incremental progress rather than entirely block some goodness (line spacing) because we couldn't figure out a hard thing (block drawing). So I'd happily welcome PRs for both things, independently. If someone is motivated to try and fix this, they shouldn't feel worried about needing to also solve box drawing. (Of course, if they want to, they're welcome to!) (for linking: #5897)
Author
Owner

@mdtauk commented on GitHub (Dec 13, 2021):

it should probably be introduced hand in hand

I'm gonna play devil's advocate: I don't think the two are strongly linked. I'd rather have incremental progress rather than entirely block some goodness (line spacing) because we couldn't figure out a hard thing (block drawing). So I'd happily welcome PRs for both things, independently. If someone is motivated to try and fix this, they shouldn't feel worried about needing to also solve box drawing. (Of course, if they want to, they're welcome to!)

(for linking: #5897)

I take your point, they are two distinct asks, but tackling the line spacing ask, will increase the amount of feedback received for the Block Drawing elements showing gaps.

So this is why I suggested the virtuous linking of the two. The Block Drawing ask, is more complicated in that there is an artistic expectation, as well as the technical side of it, having "glyph" drawing extending outside of the cell - and the potential problems in handling highlighting those Block Element cells, inverting the foreground and background.

But the Cell height is something that would fall under the Line Spacing too, as a decision would need to be made whether the height includes the line-height as a padding inside the cell, or margin between cell rows.

@mdtauk commented on GitHub (Dec 13, 2021): > > it should probably be introduced hand in hand > > I'm gonna play devil's advocate: I don't think the two are strongly linked. I'd rather have incremental progress rather than entirely block some goodness (line spacing) because we couldn't figure out a hard thing (block drawing). So I'd happily welcome PRs for both things, independently. If someone is motivated to try and fix this, they shouldn't feel worried about needing to also solve box drawing. (Of course, if they want to, they're welcome to!) > > (for linking: #5897) I take your point, they are two distinct asks, but tackling the line spacing ask, will increase the amount of feedback received for the Block Drawing elements showing gaps. So this is why I suggested the virtuous linking of the two. The Block Drawing ask, is more complicated in that there is an artistic expectation, as well as the technical side of it, having "glyph" drawing extending outside of the cell - and the potential problems in handling highlighting those Block Element cells, inverting the foreground and background. But the Cell height is something that would fall under the Line Spacing too, as a decision would need to be made whether the height includes the line-height as a padding inside the cell, or margin between cell rows.
Author
Owner

@Diablo-D3 commented on GitHub (Aug 11, 2022):

Throwing this in here, and I haven't seen anyone else make this argument: getting consistent cell width and height is hard to do across programs (different font engines, different interpretations of width and height, round up or to nearest, etc): just do what every other good terminal does, allow an signed offset to the calculation.

@Diablo-D3 commented on GitHub (Aug 11, 2022): Throwing this in here, and I haven't seen anyone else make this argument: getting consistent cell width and height is hard to do across programs (different font engines, different interpretations of width and height, round up or to nearest, etc): just do what every other good terminal does, allow an signed offset to the calculation.
Author
Owner

@rewrking commented on GitHub (Sep 17, 2022):

Bumping to say I was surprised as a user to not find this setting. it seems completely dependent on the font you're using right now.

@rewrking commented on GitHub (Sep 17, 2022): Bumping to say I was surprised as a user to not find this setting. it seems completely dependent on the font you're using right now.
Author
Owner

@DHowett commented on GitHub (Sep 17, 2022):

Well, good news! We're significantly moving up the timeframe for this feature thanks to the new text rendering engine :)

@DHowett commented on GitHub (Sep 17, 2022): Well, good news! We're significantly moving up the timeframe for this feature thanks to the new text rendering engine :)
Author
Owner

@lhecker commented on GitHub (Oct 11, 2022):

I've implemented a version of line height customization in https://github.com/microsoft/terminal/tree/dev/lhecker/3498-line-heights. I'm proposing the following:

  1. Instead of just allowing line height adjustments I think we should also allow cell width adjustments.
  2. The size adjustment can be specified as /^[+-]?\d+(?:\.\d+)?(?:%|px|pt)?$/, or in other words:
    • Sizes are mostly specified the same way line-height works in CSS. For instance:
      • 1.23 sets the size to 123% of the font size.
      • 123% works identical to 1.23
      • 1.23ch sets the size to 123% of the glyph advance (native width) of the "M" character.
      • 15pt sets the size to exactly 15pt. pt is in 72 DPI, so 15pt equals 20 physical pixels at 100% display scale (= 96 DPI).
      • 15px sets the size to exactly 15px. px is a "CSS pixel" and not physical pixels to avoid ambiguity. It's thus in 96 DPI, so 15px equals 30 physical pixels at 200% display scale.
  3. The size adjustment can be specified per profile as:
    {
        "cellSize": {
             "height": "...",
             "width": "..."
        }
    }
    

I'm not particularly happy about the design of the 3rd point and I'd be happy to hear suggestion how to better specify it. I'm not intending to write a settings UI control for this in an initial PR and only add it in a follow-up PR.

@lhecker commented on GitHub (Oct 11, 2022): I've implemented a version of line height customization in https://github.com/microsoft/terminal/tree/dev/lhecker/3498-line-heights. I'm proposing the following: 1. Instead of just allowing line height adjustments I think we should also allow cell width adjustments. 2. The size adjustment can be specified as `/^[+-]?\d+(?:\.\d+)?(?:%|px|pt)?$/`, or in other words: * Sizes are mostly specified the same way `line-height` works in CSS. For instance: * `1.23` sets the size to 123% of the font size. * `123%` works identical to `1.23` * `1.23ch` sets the size to 123% of the glyph advance (native width) of the "M" character. * `15pt` sets the size to exactly 15pt. `pt` is in 72 DPI, so 15pt equals 20 physical pixels at 100% display scale (= 96 DPI). * `15px` sets the size to exactly 15px. `px` is a "CSS pixel" and not physical pixels to avoid ambiguity. It's thus in 96 DPI, so 15px equals 30 physical pixels at 200% display scale. 3. The size adjustment can be specified per profile as: ```json { "cellSize": { "height": "...", "width": "..." } } ``` I'm not particularly happy about the design of the 3rd point and I'd be happy to hear suggestion how to better specify it. I'm not intending to write a settings UI control for this in an initial PR and only add it in a follow-up PR.
Author
Owner

@DHowett commented on GitHub (Oct 11, 2022):

CSS pixel

Users who want to use a font like Terminus might want to specify a physical pixel size rather than a virtual one. Should we consider another suffix (and borrow from the Android resource language, or something else that offers px and dip?)

@DHowett commented on GitHub (Oct 11, 2022): > CSS pixel Users who want to use a font like Terminus might want to specify a physical pixel size rather than a virtual one. Should we consider another suffix (and borrow from the Android resource language, or something else that offers `px` and `dip`?)
Author
Owner

@lhecker commented on GitHub (Oct 11, 2022):

Users who want to use a font like Terminus might want to specify a physical pixel size rather than a virtual one. Should we consider another suffix (and borrow from the Android resource language, or something else that offers px and dip?)

I've thought about this and initially considered to add a physical pixel unit, but then realized: Bitmap fonts like that already require you to enter font sizes in exact pixels and not points, but we don't even allow anything but point sizes (just like most text editors). So basically if you want to use Terminus TTF you already need to know that 18px map to 13.5pt and once you know that you can write this given my proposal:

{
    "cellSize.y": "13.5pt",
    "font":
    {
        "face": "Terminus (TTF) for Windows",
        "size": 13.5
    }
}
@lhecker commented on GitHub (Oct 11, 2022): > Users who want to use a font like Terminus might want to specify a physical pixel size rather than a virtual one. Should we consider another suffix (and borrow from the Android resource language, or something else that offers px and dip?) I've thought about this and initially considered to add a physical pixel unit, but then realized: Bitmap fonts like that already require you to enter font sizes in exact pixels and not points, but we don't even allow anything but point sizes (just like most text editors). So basically if you want to use Terminus TTF you already need to know that 18px map to 13.5pt and once you know that you can write this given my proposal: ```json { "cellSize.y": "13.5pt", "font": { "face": "Terminus (TTF) for Windows", "size": 13.5 } } ```
Author
Owner

@Diablo-D3 commented on GitHub (Oct 12, 2022):

It would be nice being able to specify CSS px (== 100% 96 dpi) along with pt to disallow any ambiguity, not only in cell height/width but also font size in general.

@Diablo-D3 commented on GitHub (Oct 12, 2022): It would be nice being able to specify CSS `px` (== 100% 96 dpi) along with `pt` to disallow any ambiguity, not only in cell height/width but also font size in general.
Author
Owner

@joakin commented on GitHub (Oct 13, 2022):

I'm not particularly happy about the design of the 3rd point and I'd be happy to hear suggestion how to better specify it.

A couple of suggestions:

{
    "cellSize": {
        "x": "...",
        "y": "..."
    }
}

I personally think that width and height are more understandable as settings, so, one of these would be nice:

{
    "cellSize": {
        "width": "...",
        "height": "..."
    }
}
{
    "cellSizeWidth": "...",
    "cellSizeHeight": "...",
}
@joakin commented on GitHub (Oct 13, 2022): > I'm not particularly happy about the design of the 3rd point and I'd be happy to hear suggestion how to better specify it. A couple of suggestions: ``` { "cellSize": { "x": "...", "y": "..." } } ``` I personally think that *width* and *height* are more understandable as settings, so, one of these would be nice: ``` { "cellSize": { "width": "...", "height": "..." } } ``` ``` { "cellSizeWidth": "...", "cellSizeHeight": "...", } ```
Author
Owner

@cool-RR commented on GitHub (Mar 6, 2023):

New to this thread, and to this project. I just tried to use this feature. I ran the command "Open settings file (JSON)", and in the "defaults" item I've put this:

    "cellSize": {
         "height": "20",
         "width": "20"
    }

I launched Windows Terminal but saw no effect. Am I doing something wrong?

@cool-RR commented on GitHub (Mar 6, 2023): New to this thread, and to this project. I just tried to use this feature. I ran the command "Open settings file (JSON)", and in the `"defaults"` item I've put this: ``` "cellSize": { "height": "20", "width": "20" } ``` I launched Windows Terminal but saw no effect. Am I doing something wrong?
Author
Owner

@zadjii-msft commented on GitHub (Mar 6, 2023):

@cool-RR What version did you try that on? This hasn't shipped in 1.16 or 1.17 - it's only checked in to main to be shipped in 1.18.

@zadjii-msft commented on GitHub (Mar 6, 2023): @cool-RR What version did you try that on? This hasn't shipped in 1.16 or 1.17 - it's only checked in to `main` to be shipped in 1.18.
Author
Owner

@cool-RR commented on GitHub (Mar 8, 2023):

Ah, I see. Indeed I tried it on 1.16.10261.0. I'm not good at building... Is there a way for me to run the latest main code without having to go through a technical building process, and without affecting the currently-installed version of Windows Terminal on my computer?

@cool-RR commented on GitHub (Mar 8, 2023): Ah, I see. Indeed I tried it on 1.16.10261.0. I'm not good at building... Is there a way for me to run the latest `main` code without having to go through a technical building process, and without affecting the currently-installed version of Windows Terminal on my computer?
Author
Owner

@Diablo-D3 commented on GitHub (Mar 11, 2023):

It seems a lot of people want this feature. Any chance of it arriving early in a 0.17-and-a-half release, or are there too many invasive changes to get it to land here?

@Diablo-D3 commented on GitHub (Mar 11, 2023): It seems a lot of people want this feature. Any chance of it arriving early in a 0.17-and-a-half release, or are there too many invasive changes to get it to land here?
Author
Owner

@o-glethorpe commented on GitHub (Mar 19, 2023):

"Windows Terminal is a new, modern, feature-rich, productive terminal application for command-line users."
Can't vertically shrink line...

@o-glethorpe commented on GitHub (Mar 19, 2023): "Windows Terminal is a new, modern, feature-rich, productive terminal application for command-line users." Can't vertically shrink line...
Author
Owner

@alcm-b commented on GitHub (Jul 18, 2023):

Windows terminal's line spacing is obviously too large when compared to what other command line tools have (user of Putty, XShell, mintty, Gnome terminal here). I'd like to have it either fixed (optimally) or made configurable (acceptable).

@alcm-b commented on GitHub (Jul 18, 2023): Windows terminal's line spacing is obviously too large when compared to what other command line tools have (user of Putty, XShell, mintty, Gnome terminal here). I'd like to have it either fixed (optimally) or made configurable (acceptable).
Author
Owner

@zadjii-msft commented on GitHub (Jul 18, 2023):

@alcm-b as discussed in literally the last 5 comments, this is already configurable as of version 1.18. Try something like:

"font":
{
    "face": "Consolas",
    "size": 12,
    "cellHeight": ".9"
}
@zadjii-msft commented on GitHub (Jul 18, 2023): @alcm-b as discussed in literally the last 5 comments, this is already configurable as of version 1.18. Try something like: ```jsonc "font": { "face": "Consolas", "size": 12, "cellHeight": ".9" } ```
Author
Owner

@alcm-b commented on GitHub (Jul 18, 2023):

@zadjii-msft thanks for pointing that out - it really is there in 1.18 👍

Moving the ticket away from backlog would help near-sighted people like me.

cellHeight = 1.1 looks great:

image

@alcm-b commented on GitHub (Jul 18, 2023): @zadjii-msft thanks for pointing that out - it really is there in 1.18 👍 Moving the ticket away from `backlog` would help near-sighted people like me. `cellHeight = 1.1` looks great: ![image](https://github.com/microsoft/terminal/assets/640604/eb7a3447-1d64-4786-8d31-16e315136596)
Author
Owner

@khushal123 commented on GitHub (Oct 9, 2023):

cellHeight does not work, tried multiple options. This should be a straight forward setting.

@khushal123 commented on GitHub (Oct 9, 2023): cellHeight does not work, tried multiple options. This should be a straight forward setting.
Author
Owner

@youk commented on GitHub (Oct 9, 2023):

Is "Line height" in Settings not straightforward enough for you?

@youk commented on GitHub (Oct 9, 2023): Is "Line height" in Settings not straightforward enough for you?
Author
Owner

@Gonkers commented on GitHub (Dec 6, 2023):

cellHeight does not work, tried multiple options. This should be a straight forward setting.

I just came upon this thread, and I found that cellHeight worked for my needs. It does take decimal values.

            "font": {
                "face": "Cascadia Mono",
                "size": 10,
                "weight": "normal",
                "cellHeight": "1.3"
            }
@Gonkers commented on GitHub (Dec 6, 2023): > cellHeight does not work, tried multiple options. This should be a straight forward setting. I just came upon this thread, and I found that `cellHeight` worked for my needs. It does take decimal values. ```json "font": { "face": "Cascadia Mono", "size": 10, "weight": "normal", "cellHeight": "1.3" } ```
Author
Owner

@liuyang12 commented on GitHub (Jun 14, 2024):

I confirm that cellWidth and cellHeight under font are exactly what I want and work perfect for me. Here is a example of Fira Code.

"font": 
{
    "cellWidth": "0.58",
    "cellHeight": "1.15",
    "face": "Fira Code Retina"
},

screenshot of Windows Terminal
image

@liuyang12 commented on GitHub (Jun 14, 2024): I confirm that `cellWidth` and `cellHeight` under `font` are exactly what I want and work perfect for me. Here is a example of Fira Code. ```json "font": { "cellWidth": "0.58", "cellHeight": "1.15", "face": "Fira Code Retina" }, ``` screenshot of Windows Terminal <img width="670" alt="image" src="https://github.com/microsoft/terminal/assets/8788563/492006c2-f781-422f-9c2a-3c8ba3d3cbb5">
Author
Owner

@knileshh commented on GitHub (Sep 22, 2025):

Image

I want more margin, between the lines, how can I do that? I tried line height and cell Height didn't work.

@knileshh commented on GitHub (Sep 22, 2025): <img width="604" height="155" alt="Image" src="https://github.com/user-attachments/assets/a7d5aaa1-333f-46cc-8b87-5a6d8694a928" /> I want more margin, between the lines, how can I do that? I tried line height and cell Height didn't work.
Author
Owner

@DHowett commented on GitHub (Sep 22, 2025):

This is exactly what line/cell height are for.

Image

Can you share your settings file? And please file a new bug if a feature is not working for you; do not resurrect one from six years ago.

@DHowett commented on GitHub (Sep 22, 2025): This is exactly what line/cell height are for. <img width="1847" height="958" alt="Image" src="https://github.com/user-attachments/assets/903135a8-1db9-40d9-bcce-5c27deb56196" /> Can you share your settings file? And please file a new bug if a feature is not working for you; do not resurrect one from six years ago.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4885