Dashed horizontal line (---) when using TUI tools and JetBrainsMono NF #18224

Closed
opened 2026-01-31 06:07:22 +00:00 by claunia · 13 comments
Owner

Originally created by @AdalZanabria on GitHub (Aug 20, 2022).

Windows Terminal version

Windows Terminal 1.14.1962.0. Also tested in Windows Terminal Preview 1.15.2002.0. Both tested with AtlasEngine off and on.

Windows build number

10.0.19044.0

Other Software

Any TUI tool with horizontal lines, for example:

  • Midnight Commander
  • Ranger
  • Neofetch
  • some special prompts using ---

Steps to reproduce

Open any Terminal User Interface tool that uses horizontal lines as separators like Midnight Commander, Ranger, neofetch, etc. While using the JetBrainsMono NF font.

Expected Behavior

To horizontal lines to render as single continuous line.

The following are examples of the same font and same size in different terminals rendering with the expected behavior:

VS Code Integrated Terminal:
vscode

Wezterm:
wezterm

Hyper:
hyper

Actual Behavior

Horizontal lines render dashed, as spaced - - - -

Windows Terminal:
wt

Windows Terminal Preview:
wtp

Not sure what can be causing this since the same exact font seems to be working on other terminals just fine, I also tested other NerdFonts like FiraCode NF in both Windows Terminal and Windows Terminal Preview and it displays the horizontal lines correctly. I thought that maybe because it was .ttf instead of .otf? But I installed FiraCode NF as .ttf and it worked fine with the lines.

Again, I also tried the Atlas Engine on are off with the same result.
I also made sure to install the versions which don't state "Mono" as a sufix in the font file name since NerdFonts specify that they could cause problems rendering ligature characters in favor of monospacing them. I did the same with FiraCode NF and Fira's horizontal lines are working while Jetbrains not.
Again this is not a problem only for Midnight Commander, it happens with every TUI Tool that uses horizontal lines or special prompts like the ones used with zsh.
I downloaded the font from nerdfonts Github repository which was rebuilt yesterday, but again the same font is working fine in other terminals.

Originally created by @AdalZanabria on GitHub (Aug 20, 2022). ### Windows Terminal version Windows Terminal 1.14.1962.0. Also tested in Windows Terminal Preview 1.15.2002.0. Both tested with AtlasEngine off and on. ### Windows build number 10.0.19044.0 ### Other Software Any TUI tool with horizontal lines, for example: - Midnight Commander - Ranger - Neofetch - some special prompts using --- ### Steps to reproduce Open any Terminal User Interface tool that uses horizontal lines as separators like Midnight Commander, Ranger, neofetch, etc. While using the JetBrainsMono NF font. ### Expected Behavior To horizontal lines to render as single continuous line. The following are examples of the same font and same size in different terminals rendering with the expected behavior: VS Code Integrated Terminal: <img width="428" alt="vscode" src="https://user-images.githubusercontent.com/57764806/185756160-b5ff7ade-f92b-4145-97e9-2a651d83f153.png"> Wezterm: <img width="467" alt="wezterm" src="https://user-images.githubusercontent.com/57764806/185756167-7810c9d0-9d0a-4a20-b9c6-2a8ee44c2fe6.png"> Hyper: <img width="455" alt="hyper" src="https://user-images.githubusercontent.com/57764806/185756177-a2b58125-0718-478a-906a-fb0bd4f62cec.png"> ### Actual Behavior Horizontal lines render dashed, as spaced - - - - Windows Terminal: <img width="457" alt="wt" src="https://user-images.githubusercontent.com/57764806/185756348-47cc2289-85eb-42eb-9573-64f1babf84af.png"> Windows Terminal Preview: <img width="455" alt="wtp" src="https://user-images.githubusercontent.com/57764806/185756307-f0f6aabc-0165-4245-a505-ebbc709209b1.png"> Not sure what can be causing this since the same exact font seems to be working on other terminals just fine, I also tested other NerdFonts like FiraCode NF in both Windows Terminal and Windows Terminal Preview and it displays the horizontal lines correctly. I thought that maybe because it was .ttf instead of .otf? But I installed FiraCode NF as .ttf and it worked fine with the lines. Again, I also tried the Atlas Engine on are off with the same result. I also made sure to install the versions which don't state "Mono" as a sufix in the font file name since NerdFonts specify that they could cause problems rendering ligature characters in favor of monospacing them. I did the same with FiraCode NF and Fira's horizontal lines are working while Jetbrains not. Again this is not a problem only for Midnight Commander, it happens with every TUI Tool that uses horizontal lines or special prompts like the ones used with zsh. I downloaded the font from nerdfonts Github repository which was rebuilt yesterday, but again the same font is working fine in other terminals.
Author
Owner

@237dmitry commented on GitHub (Aug 20, 2022):

I would try Nerd Font, not NF

@237dmitry commented on GitHub (Aug 20, 2022): I would try `Nerd Font`, not `NF`
Author
Owner

@AdalZanabria commented on GitHub (Aug 20, 2022):

I would try Nerd Font, not NF

Thanks for the reply, but I'm not typing the name in the JSON, JetBrainsMono NF is how the system detects the font, both in control panel and in the GUI settings for Windows Terminal.
jetbrainsmono_nf

@AdalZanabria commented on GitHub (Aug 20, 2022): > I would try `Nerd Font`, not `NF` Thanks for the reply, but I'm not typing the name in the JSON, `JetBrainsMono NF` is how the system detects the font, both in control panel and in the GUI settings for Windows Terminal. <img width="167" alt="jetbrainsmono_nf" src="https://user-images.githubusercontent.com/57764806/185761852-1ee4f2af-9e11-4d55-a94e-74659a158e7e.png">
Author
Owner

@237dmitry commented on GitHub (Aug 20, 2022):

but I'm not typing the name in the JSON

I wanted to say that you could try a different font edition. Not 'NF' font, but 'Nerd Font' one.

Screenshot 2022-08-20 222031

@237dmitry commented on GitHub (Aug 20, 2022): > but I'm not typing the name in the JSON I wanted to say that you could try a different font edition. Not 'NF' font, but 'Nerd Font' one. ![Screenshot 2022-08-20 222031](https://user-images.githubusercontent.com/78153320/185763189-19b7fb45-400f-428f-b53b-229803ad955f.png)
Author
Owner

@AdalZanabria commented on GitHub (Aug 20, 2022):

I wanted to say that you could try a different font edition. Not 'NF' font, but 'Nerd Font' one.

Oh yeah, I tried with all the available compatible fonts that come with the JetBrainsMono zip and still the same, and anyway I don't think the font is the problem because it works fine in all the other terminals but Windows Terminal.

@AdalZanabria commented on GitHub (Aug 20, 2022): > I wanted to say that you could try a different font edition. Not 'NF' font, but 'Nerd Font' one. Oh yeah, I tried with all the available compatible fonts that come with the JetBrainsMono zip and still the same, and anyway I don't think the font is the problem because it works fine in all the other terminals but Windows Terminal.
Author
Owner

@zadjii-msft commented on GitHub (Aug 22, 2022):

@lhecker Does this look like the kinda thing that would have been fixed alongside the other PL fixes for atlas engine in 1.16?

@zadjii-msft commented on GitHub (Aug 22, 2022): @lhecker Does this look like the kinda thing that would have been fixed alongside the other PL fixes for atlas engine in 1.16?
Author
Owner

@lhecker commented on GitHub (Aug 22, 2022):

@AdalZanabria Can you please link the exact font file which works in VS Code but doesn't work in Windows Terminal? I tried this one but it works in neither application the way you describe it. I'd also need to know how you got ligatures working in the VS Code terminal. Support for it has been broken since about 2017...

I've set "editor.fontLigatures": true in VS Code and while I get nice lines in the editor:
image

I don't get any in the terminal:
image

@lhecker commented on GitHub (Aug 22, 2022): @AdalZanabria Can you please link the exact font file which works in VS Code but doesn't work in Windows Terminal? I tried [this one](https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/Ligatures/Regular/complete/JetBrains%20Mono%20Regular%20Nerd%20Font%20Complete%20Windows%20Compatible.ttf) but it works in neither application the way you describe it. I'd also need to know how you got ligatures working in the VS Code terminal. Support for it has been broken since about 2017... I've set `"editor.fontLigatures": true` in VS Code and while I get nice lines in the editor: ![image](https://user-images.githubusercontent.com/2256941/185925155-cc95378f-b740-4b90-ba1c-83369907a04f.png) I don't get any in the terminal: ![image](https://user-images.githubusercontent.com/2256941/185925231-b777475f-5662-46fc-9329-25efd097493f.png)
Author
Owner

@AdalZanabria commented on GitHub (Aug 22, 2022):

@AdalZanabria Can you please link the exact font file which works in VS Code but doesn't work in Windows Terminal?

I'm using that exact same one, however it seems like the box drawings aren't ligatures, since just as you mention ligatures don't work:
ligatures

But it still can render a continuous line:
mc-vscode

I changed the font to glorious Comic Sans MS, a font which obviously doesn't support ligatures and it can still render continuous lines just fine:
comic_sans

While taking this screenshots and checking the integrated terminal setting, I had a finding, a setting called "Custom Gyphs" which states it draws custom glyphs for block elements and box drawing characters, this is a screenshot with it on:
custom_glyphs_on

And this is a screenshot with it turned off:
custom_glyphs_off

So that's what's making the magic.
Now, going back to Windows Terminal, it's weird that it also uses "Custom Glyphs" (Going by VS Codes nomenclature)
But only for vertical lines, not horizontal... (while using JetBrainsMono NF)
no_glyphs_vertical

But when using another font such as FiraCode NF
FiraCode_NF
It does render both vertical and horizontal custom glyphs, so it doesn't sound like a custom glyphs problem...

And this is the exact same font (JetBrainsMono NF) in wezterm without any custom glyphs issues:
wezterm

So it's not a problem with the font, it's just when both are together.

@AdalZanabria commented on GitHub (Aug 22, 2022): > @AdalZanabria Can you please link the exact font file which works in VS Code but doesn't work in Windows Terminal? I'm using that exact same one, however it seems like the box drawings aren't ligatures, since just as you mention ligatures don't work: ![ligatures](https://user-images.githubusercontent.com/57764806/185980503-6fd397ce-80d2-4b27-86d5-234f2559c8eb.png) But it still can render a continuous line: ![mc-vscode](https://user-images.githubusercontent.com/57764806/185980662-cb7e3e57-6377-4d89-98e9-d8b4b85521a0.png) I changed the font to glorious Comic Sans MS, a font which obviously doesn't support ligatures and it can still render continuous lines just fine: <img width="834" alt="comic_sans" src="https://user-images.githubusercontent.com/57764806/185983541-3c2ec02a-fdb9-4d59-bffc-9c9b99523b7e.png"> While taking this screenshots and checking the integrated terminal setting, I had a finding, a setting called "Custom Gyphs" which states it draws custom glyphs for block elements and box drawing characters, this is a screenshot with it on: ![custom_glyphs_on](https://user-images.githubusercontent.com/57764806/185981016-61dcc92a-4b00-4f97-bb04-3b288d9ddcfa.png) And this is a screenshot with it turned off: ![custom_glyphs_off](https://user-images.githubusercontent.com/57764806/185981147-590f91e5-9a9b-48cd-8e6c-865d4d6d252e.png) So that's what's making the magic. Now, going back to Windows Terminal, it's weird that it also uses "Custom Glyphs" (Going by VS Codes nomenclature) But only for vertical lines, not horizontal... (**_while_** using JetBrainsMono NF) <img width="710" alt="no_glyphs_vertical" src="https://user-images.githubusercontent.com/57764806/185981640-34a165b5-25de-4fcc-81af-1f70358a734e.png"> But when using another font such as FiraCode NF <img width="710" alt="FiraCode_NF" src="https://user-images.githubusercontent.com/57764806/185981937-416b3a79-1fb7-4964-ae65-9efc9cfce122.png"> It does render both vertical and horizontal custom glyphs, so it doesn't sound like a custom glyphs problem... And this is the exact same font (JetBrainsMono NF) in wezterm without any custom glyphs issues: <img width="495" alt="wezterm" src="https://user-images.githubusercontent.com/57764806/185982451-ce58521c-9b1d-4223-b36c-90eaed103560.png"> So it's not a problem with the font, it's just when both are together.
Author
Owner

@lhecker commented on GitHub (Aug 22, 2022):

I see... I thought the issue was with actual dashes (U+002D "-"), but those sure seems like box characters (U+2500 "─"). In that case this issue will be fixed in 1.16 when the new text renderer / AtlasEngine is enabled. The specific PR that fixed this is #13549. 1.16 will support all "block element" and "box drawing" characters as well as the classic powerline glyphs (source).

@lhecker commented on GitHub (Aug 22, 2022): I see... I thought the issue was with actual dashes (U+002D "-"), but those sure seems like box characters (U+2500 "─"). In that case this issue will be fixed in 1.16 when the new text renderer / AtlasEngine is enabled. The specific PR that fixed this is #13549. 1.16 will support all "block element" and "box drawing" characters as well as the classic powerline glyphs ([source](https://github.com/microsoft/terminal/blob/2dedc9af7f87a925ecb5e07fe3129beaa54b0624/src/renderer/atlas/AtlasEngine.r.cpp#L301-L320)).
Author
Owner

@AdalZanabria commented on GitHub (Aug 23, 2022):

issue will be fixed in 1.16 when the new text renderer / AtlasEngine is enabled

Is it an updated version from the the one that can be used right now with "experimental.useAtlasEngine": true ?
Because I already tested with that and the same problem persists.

@AdalZanabria commented on GitHub (Aug 23, 2022): > issue will be fixed in 1.16 when the new text renderer / AtlasEngine is enabled Is it an updated version from the the one that can be used right now with `"experimental.useAtlasEngine": true` ? Because I already tested with that and the same problem persists.
Author
Owner

@lhecker commented on GitHub (Aug 23, 2022):

#13549 hasn't been released yet, but will be soon. You can subscribe to that pull request to get notified once it's been released. 🙂

@lhecker commented on GitHub (Aug 23, 2022): #13549 hasn't been released yet, but will be soon. You can subscribe to that pull request to get notified once it's been released. 🙂
Author
Owner

@AdalZanabria commented on GitHub (Aug 23, 2022):

Ok, I'll do that. Thank you very much!

@AdalZanabria commented on GitHub (Aug 23, 2022): Ok, I'll do that. Thank you very much!
Author
Owner

@ofek commented on GitHub (Jan 25, 2023):

This is still broken for me on the latest preview release using the font CaskaydiaCove Nerd Font

@ofek commented on GitHub (Jan 25, 2023): This is still broken for me on the latest preview release using the font CaskaydiaCove Nerd Font
Author
Owner

@ofek commented on GitHub (Jan 25, 2023):

Actually upgrading the font in addition to using the latest release fixes the issue

@ofek commented on GitHub (Jan 25, 2023): Actually upgrading the font in addition to using the latest release fixes the issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18224