could we provide a legacy font render option like windows console host style? #20236

Closed
opened 2026-01-31 07:07:41 +00:00 by claunia · 14 comments
Owner

Originally created by @zhishi on GitHub (Jul 14, 2023).

Description of the new feature/enhancement

Currently I'm doing coding work mostly on remote host via ssh, and I liked the new windows terminal a lot. However there is one thing caused me to go back to the old windows console host. There is minor difference between the new windows terminal and the old windows console host on font rendering style, but it just annoys me enough to not using windows terminal.

As I know font show different size on windows terminal and windows console host. For example when I use consolas font, I need choose size 11 in windows terminal to match the size 16 in windows console host:
image

And that size 11 still can't generate same width and height like the size 16 in windows console host, it has a little bit wider and taller space between characters. which results in less lines and text showed in my text editor, for example you can see below picture showed the gap of lines become bigger and bigger between the windows console host (background) and windows terminal:
image
Another problem showed in above picture is that green arrow in left side (if you are using zsh you should familiar with that arrow). The windows terminal for some reason render it much smaller than normal size, which just give a non-consistence overall view.

So overall I just like windows console host more for the compact and consistence render style (it also match iterm2 style better), but I guess it's not hard to add same render option in windows terminal since they share a lot code base. maybe just provide a checkbox with legacy render style?

Originally created by @zhishi on GitHub (Jul 14, 2023). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Currently I'm doing coding work mostly on remote host via ssh, and I liked the new windows terminal a lot. However there is one thing caused me to go back to the old windows console host. There is minor difference between the new windows terminal and the old windows console host on font rendering style, but it just annoys me enough to not using windows terminal. As I know font show different size on windows terminal and windows console host. For example when I use consolas font, I need choose size 11 in windows terminal to match the size 16 in windows console host: ![image](https://github.com/microsoft/terminal/assets/7774044/4e25160c-99b2-431c-b616-356619cddde2) And that size 11 still can't generate same width and height like the size 16 in windows console host, it has a little bit wider and taller space between characters. which results in less lines and text showed in my text editor, for example you can see below picture showed the gap of lines become bigger and bigger between the windows console host (background) and windows terminal: ![image](https://github.com/microsoft/terminal/assets/7774044/9a92a9c1-4d49-4c2c-a425-5c36902af829) Another problem showed in above picture is that green arrow in left side (if you are using zsh you should familiar with that arrow). The windows terminal for some reason render it much smaller than normal size, which just give a non-consistence overall view. So overall I just like windows console host more for the compact and consistence render style (it also match iterm2 style better), but I guess it's not hard to add same render option in windows terminal since they share a lot code base. maybe just provide a checkbox with legacy render style? <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). -->
claunia added the Area-RenderingIssue-TaskResolution-Duplicate labels 2026-01-31 07:07:41 +00:00
Author
Owner

@lhecker commented on GitHub (Jul 14, 2023):

I'm intending to implement such an option for #14165. As a stop gap you can convert the font size of Consolas from conhost to Windows Terminal by dividing by 1.5611979167. A font size of 16 in conhost for instance corresponds to a font size of 10.24854045 in Windows Terminal. It should then look quite similar if not identical. 🙂

@lhecker commented on GitHub (Jul 14, 2023): I'm intending to implement such an option for #14165. As a stop gap you can convert the font size of Consolas from conhost to Windows Terminal by dividing by 1.5611979167. A font size of 16 in conhost for instance corresponds to a font size of 10.24854045 in Windows Terminal. It should then look quite similar if not identical. 🙂
Author
Owner

@zhishi commented on GitHub (Jul 14, 2023):

Glad to see I'm not the only one care about such minor things, I guess when people using terminal they usually expect everything aligned like a real terminal feeling. I tried the 10.24854045, but it doesn't work, I even used 10 now but the gap still bigger than conhost:
image
And the green arrow still very small. I think there is some fundamental difference between the two render engine rather than just font size calculation. really hopes we can have a toggle to switch to the conhost render completely.

@zhishi commented on GitHub (Jul 14, 2023): Glad to see I'm not the only one care about such minor things, I guess when people using terminal they usually expect everything aligned like a real terminal feeling. I tried the 10.24854045, but it doesn't work, I even used 10 now but the gap still bigger than conhost: ![image](https://github.com/microsoft/terminal/assets/7774044/0eded7cf-7865-4616-ab19-380a2e09eb5a) And the green arrow still very small. I think there is some fundamental difference between the two render engine rather than just font size calculation. really hopes we can have a toggle to switch to the conhost render completely.
Author
Owner

@237dmitry commented on GitHub (Jul 15, 2023):

If you do not take into account the font sizes, then in my opinion their rendering, both in conhost and in wt, is almost identical. In conhost font size is 20, in wt 15.0. Font Agave Nerd Font.

"useAtlasEngine": false

Display scaling 100%

Screenshot 2023-07-15 020126

@237dmitry commented on GitHub (Jul 15, 2023): If you do not take into account the font sizes, then in my opinion their rendering, both in `conhost` and in `wt`, is almost identical. In conhost font size is 20, in wt 15.0. Font `Agave Nerd Font`. ``` "useAtlasEngine": false ``` Display scaling 100% ![Screenshot 2023-07-15 020126](https://github.com/microsoft/terminal/assets/78153320/de9999be-49a1-41c8-92fc-f0f52ff22291)
Author
Owner

@lhecker commented on GitHub (Jul 15, 2023):

@237dmitry Is there a reason you use "useAtlasEngine": false? We're planning to remove the old text renderer in about 2 releases, so if there's something missing or broken, please let us know! 🙂

@lhecker commented on GitHub (Jul 15, 2023): @237dmitry Is there a reason you use `"useAtlasEngine": false`? We're planning to remove the old text renderer in about 2 releases, so if there's something missing or broken, please let us know! 🙂
Author
Owner

@zhishi commented on GitHub (Jul 15, 2023):

also could you try consolas font? I guess different font may have different effect.

@zhishi commented on GitHub (Jul 15, 2023): also could you try consolas font? I guess different font may have different effect.
Author
Owner

@zhishi commented on GitHub (Jul 15, 2023):

Btw, I have another minor request (may need open a new issue?). I found the tab title bar just too tall which waste lots of screen space. could we make it as narrow as the conhost title bar?
image

@zhishi commented on GitHub (Jul 15, 2023): Btw, I have another minor request (may need open a new issue?). I found the tab title bar just too tall which waste lots of screen space. could we make it as narrow as the conhost title bar? ![image](https://github.com/microsoft/terminal/assets/7774044/2d5c626a-d167-4a16-9d80-f159a3459b0d)
Author
Owner

@lhecker commented on GitHub (Jul 15, 2023):

@zhishi Ah if you want to also replicate the exact "cell size" of conhost then you'll have to do one more thing... If you install Windows Terminal Preview (version 1.18) and open the settings.json file, then next to your font "size" entry you can add this:

{
    "profiles":
    {
        "defaults":
        {
            "font":
            {
                "face": "Consolas",
                "size": 10.24854045,
                "cellHeight": "16px"
            }
        }
    }
}

There's also a matching "cellWidth" option. The argument is a CSS string and it supports pt, px, percentages, etc. The 10.24854045 as font size is correct (I've just tested it).

You have to do this, because right now the algorithm for determining the line height and cell width is slightly different from GDI as used in conhost. As part of #14165 I'll try to make the two match as closely as possible (without sacrificing accuracy). But there will always be a mismatch at certain font sizes and display scales, most importantly because GDI doesn't even use float - it does all calculations with integers! And so you get a slightly different rounding behavior...

Edit, Note to self: Will tag needs-discussion to learn more about tab title heights.

@lhecker commented on GitHub (Jul 15, 2023): @zhishi Ah if you want to also replicate the exact "cell size" of conhost then you'll have to do one more thing... If you install Windows Terminal Preview (version 1.18) and open the settings.json file, then next to your font "size" entry you can add this: ```json { "profiles": { "defaults": { "font": { "face": "Consolas", "size": 10.24854045, "cellHeight": "16px" } } } } ``` There's also a matching "cellWidth" option. The argument is a CSS string and it supports pt, px, percentages, etc. The 10.24854045 as font size is correct (I've just tested it). You have to do this, because right now the algorithm for determining the line height and cell width is slightly different from GDI as used in conhost. As part of #14165 I'll try to make the two match as closely as possible (without sacrificing accuracy). But there will always be a mismatch at certain font sizes and display scales, most importantly because GDI doesn't even use `float` - it does all calculations with integers! And so you get a slightly different rounding behavior... Edit, Note to self: Will tag needs-discussion to learn more about tab title heights.
Author
Owner

@zhishi commented on GitHub (Jul 15, 2023):

cool, thanks for the followup. I wonder could the green arrow size also caused by the integers? I'll give it a try.

@zhishi commented on GitHub (Jul 15, 2023): cool, thanks for the followup. I wonder could the green arrow size also caused by the integers? I'll give it a try.
Author
Owner

@237dmitry commented on GitHub (Jul 15, 2023):

Is there a reason you use "useAtlasEngine": false?

I do not like Atlas as it is rendering some double place symbols incorrectly.

We're planning to remove the old text renderer in about 2 releases, so if there's something missing or broken, please let us know!

There are many terminal alternatives. Conhost is good also, if it could hide scrollbar and could clickable hyperlinks...

@237dmitry commented on GitHub (Jul 15, 2023): > Is there a reason you use "useAtlasEngine": false? I do not like Atlas as it is rendering some double place symbols incorrectly. > We're planning to remove the old text renderer in about 2 releases, so if there's something missing or broken, please let us know! There are many terminal alternatives. Conhost is good also, if it could hide scrollbar and could clickable hyperlinks...
Author
Owner

@lhecker commented on GitHub (Jul 15, 2023):

I wonder could the green arrow size also caused by the integers?

@zhishi No, not really. When you use conhost, the font determines how many columns a glyph occupies. Since the arrow is wide it occupies 2 columns. But Windows Terminal works more like most other terminals, where the Unicode standard UAX#11 determines how wide glyphs are. And there the arrow is considered 1 column wide.
If you use Windows Terminal Preview however it will result in an arrow that looks identical to the one in conhost anyways. That's because the new "AtlasEngine" in Preview allows glyphs to be wider than the amount of columns allocated to them, combining the way conhost works with the way other Terminals work:

image

I do not like Atlas as it is rendering some double place symbols incorrectly.

@237dmitry I'm also planning to make AtlasEngine the default in conhost at some point in the distant future. If you could tell us what it handles poorly, I'll fix it as soon as possible. 🙂
(But try out the Preview version 1.18 if you haven't done so yet. It has an entirely new version of the renderer which might have fixed your issue already.)

@lhecker commented on GitHub (Jul 15, 2023): > I wonder could the green arrow size also caused by the integers? @zhishi No, not really. When you use conhost, the font determines how many columns a glyph occupies. Since the arrow is wide it occupies 2 columns. But Windows Terminal works more like most other terminals, where the Unicode standard [UAX#11](https://www.unicode.org/reports/tr11/tr11-40.html) determines how wide glyphs are. And there the arrow is considered 1 column wide. If you use Windows Terminal Preview however it will result in an arrow that looks identical to the one in conhost anyways. That's because the new "AtlasEngine" in Preview allows glyphs to be wider than the amount of columns allocated to them, combining the way conhost works with the way other Terminals work: ![image](https://github.com/microsoft/terminal/assets/2256941/f0efb09e-9b21-422d-ba76-38abfd3787fa) > I do not like Atlas as it is rendering some double place symbols incorrectly. @237dmitry I'm also planning to make AtlasEngine the default in conhost at some point in the distant future. If you could tell us what it handles poorly, I'll fix it as soon as possible. 🙂 (But try out the Preview version 1.18 if you haven't done so yet. It has an entirely new version of the renderer which might have fixed your issue already.)
Author
Owner

@237dmitry commented on GitHub (Jul 15, 2023):

But try out the Preview version 1.18 if you haven't done so yet

Hmm, I tried turning on Atlas and it really works better than before. And I've been using 1.18 since its release. I guess I got so used to the fact that the Atlas Engine did not display some characters well that I was biased towards it and always turned it off. I apologize for the unfounded criticism. Now it really is much better.

@237dmitry commented on GitHub (Jul 15, 2023): > But try out the Preview version 1.18 if you haven't done so yet Hmm, I tried turning on Atlas and it really works better than before. And I've been using 1.18 since its release. I guess I got so used to the fact that the Atlas Engine did not display some characters well that I was biased towards it and always turned it off. I apologize for the unfounded criticism. Now it really is much better.
Author
Owner

@lhecker commented on GitHub (Jul 17, 2023):

For compact title bars you can follow this issue #5911.

@lhecker commented on GitHub (Jul 17, 2023): For compact title bars you can follow this issue #5911.
Author
Owner

@carlos-zamora commented on GitHub (Aug 2, 2023):

Since @lhecker is already working on this, I'm going to mark this as a /dup of #14165.

@carlos-zamora commented on GitHub (Aug 2, 2023): Since @lhecker is already working on this, I'm going to mark this as a /dup of #14165.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Aug 2, 2023):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Aug 2, 2023): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20236