Remember to have block and line drawing characters fill their cells properly
Just a reminder for the new Windows Terminal, remember to make sure block and line drawing characters fill their cells properly at all zoom levels. This is really important for ANSI-art and TUI apps.

See color bleeding and horizontal lines in the larger Windows Terminal tab. Also, some characters are randomly replaced by � (>) characters when changing zoom level or when printing out lot of VT markup.
You know, I coulda swore @miniksa had a PR for this just last week, but I dunno what happened to it...
Some more examples, comparing mlterm (running in Ubuntu on WSL with X410) with Windows Terminal

See it exhibits not only the block and line characters alignments and joints issues, but also identical colors rendering as different colors (the whole ANSI-art is using only the 16 palettized VT colors). Note also in the center, black (\e[40m) rendering as acrylic transparency.
You can get the test file from the following repository : https://github.com/PhMajerus/ANSI-art/blob/master/TestPattern%20ANSI.ans
The identical colors rendering as different colors mentioned above has been diagnosed in #677 and hopefully fixed in #688.
I just tested it and it looks like the colors are now matching correctly. So, this is gonna be fixed in #688.

I did find another bug though, look at how some characters get rendered incorrectly if I didn't execute another command before showing the test pattern. For example: show pic -> incorrect chars clear -> show pic -> incorrect chars clear -> any command (even clear) -> show pic -> correct output.

One more thing, try zooming in (Ctrl mwheel) and at the right level of magnification the output looks perfectly fine.
@Ghosty141 thanks for fixing and testing it, that's one thing out of the way.
What you're observing are the two other issues I described in the first message.
The terminal cells and the size of the block drawing characters do not match at all zoom levels, making them overlap or not fill their cell, creating visual horizontal lines. This is easily observed if you display █▀▄░▒▓, their heights won't be consistent. Strangely, trying these at different sizes in Word with the Consolas font shows them always filling the exact same rectangle, only Conhost and Terminal seems to stretch these characters at some sizes, sometimes by as much as 2x.
The last issue with the � characters appearing a bit randomly seems like a bug in Terminal itself, and is probably in the rendering engine as it depends on the zoom level and at the same time seems to always appear at the exact same place for the exact same buffer to render. Note that � could be U+FFFD, the "replacement character". So it could be drawn by some API when requested to draw invalid data.
@PhMajerus, I'm aware of the randomish U+FFFD issue. I have an outstanding task to try to debug why that's happening. I'll get to it eventually.
Interesting, is this related also to the way that F7 in cmd.exe renders itself with spaces/lines?

F7 is implemented in the COOKED_READ logic for CMD.exe and actually changes which symbols it uses for the outline based on codepage... or at least it used to.
from @vblazhkun, #2006
Environment
Windows build number: [Version 10.0.18362.239] Windows Terminal version (if applicable): 0.2.1831.0 Any other software? WSL Ubuntu: [1804.2019.521.0]Steps to reproduce
- Install Pragmata Pro Mono Liga 0.827 font (any other Unicode font should work as well).
- Open the Windows Terminal with WSL Ubuntu tab.
- Download and display the
UTF-8 Demo Text.$ curl https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txtExpected behavior
No visible interline gap (the screenshot is from
Cmder 180626with WLS Ubuntu):
Actual behavior
Visible sparse interline gap:
Just checking in on this. This is Fira Code using GUI.CS

@shanselman I have just checked with the latest dev build, but the inter-line gap is still there.
Some terminals, including VTE and Konsole draw the U+2500..257F (or even up to 259F) glyphs manually, rather than taking them from the font. This prevents such problems (and also avoids ugly looking antialiasing). I haven't seen any monospace font that would just look perfect on its own.
Interestingly, independently from each other, both VTE and Konsole came up with the idea of defining the look of most of these codepoints as a 5x5 matrix (where how the given 5x5 grid is stretched to the character cell is not necessarily the same for thick lines vs. double lines).
Update: Konsole recently changed not to use a 5x5 matrix but other means of drawing.
from @egmontkob
If you're about to implement manually drawing these glyphs, please also consider the U+1FB00 block to be added to Unicode 13 (further info via the VTE issue).
Let's note that this issue now tracks two technically independent stories:
-
A thin dark horizontal line between the background of every second or so text row, related to HiDPI;
-
Line/box drawing glyphs (their foregrounds) not perfectly aligning.
@egmontkob And the possibility of the Terminal rendering the box and block drawing glyphs itself, so alignment will be perfect, no matter what Line Spacing or character cell widths and heights the current font is set to?
Yup, this is what I meant with my second bullet point :)
The same issue here. But I can fix it by setting "fontSize": 13. my resolution is 2560 X 1600, scale factor 150%.
when "fontSize": 12
after setting "fontSize": 13

Same issue here, HiDPI problem: 1.75 scaling factor / 4k resolution.
@egmontkob And the possibility of the Terminal rendering the box and block drawing glyphs itself, so alignment will be perfect, no matter what Line Spacing or character cell widths and heights the current font is set to?
I think the terminal should not render the glyphs itself but use the normal ones from the font that is configured otherwise it breaks with the general appearance of the configured font.
And generally asked, is there any progress on this matter? I try to imagine why it is so complicated after all. All other consoles known to me seem to have no trouble with this.

