microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.23k stars 8.27k forks source link

Some characters are not rendered at small font sizes #11376

Closed boltronics closed 3 years ago

boltronics commented 3 years ago

Windows Terminal version (or Windows build number)

1.10.2383.0

Other Software

tree v1.8.0 (inside a Debian WSL2 environment)

Steps to reproduce

Set the Font size to 8, and Font face to something like Consolas, or Liberation Mono.

Alternatively, set Font size to 9 and set Font face to Terminus (TTF) For Windows (my personal preference).

Run tree

(or run pass or any other software that relies on it).

Expected Behavior

You should see something like:

~$ tree dir
dir/
├── file1.txt
└── file2.txt

Actual Behavior

Instead, you'll see something like:

~$ tree dir
dir/
    file1.txt
    file2.txt

It took me a lot of testing to figure out that I needed to bump my font size up for these characters to render, since every font I tried wouldn't show it (although that was apparently just luck since some fonts do render the lines with varying degrees of success). I initially thought the colour was somehow matching the background, since the characters were present since I could copy them. Unfortunately, I find that increasing the font size to the required degree is not acceptable.

A more acceptable work-around is to define a shell function like so:

~$ tree() { TREE_CHARSET='C' /usr/bin/tree "${@}" ; }
~$ tree testdir/
testdir/
|-- file1.txt
`-- file2.txt

0 directories, 1 file
~$

Of course it still looks more ugly than it should, but at least it shows something without affecting everything else.

If I apt install terminator and the Terminus fonts and run it under VcXsrv, it works perfectly.

image (Windows Terminal on the left, Terminator on the right)

elsaco commented 3 years ago

@boltronics "tree -A" turns on ANSI line graphics hack. Works every time!

boltronics commented 3 years ago

@elsaco Thanks for the suggestion. Unfortunately that made no difference for me. image Also, when pressing Ctrl+C because I accidentally ran tree -A across a large directory, I got the corruption you see in the top pane. I've never seen that happen before (although that'll be unrelated).

boltronics commented 3 years ago

FWIW, corruption was fixed with echo ^N (that's ctrl+v, ctrl+n) although I could have just reopened a new window I guess.

j4james commented 3 years ago

I think this is probably covered by #7927 or #5897 (see for example https://github.com/microsoft/terminal/issues/5897#issuecomment-803492674). Possibly also #6161.

boltronics commented 3 years ago

Thanks @j4james you are right, it's a dupe of #7927 I'd say. Closing.