mintty / wsltty

Mintty as a terminal for Bash on Ubuntu on Windows / WSL
Other
3.1k stars 103 forks source link

Box drawing shows gaps with some fonts #353

Open tig opened 1 month ago

tig commented 1 month ago

The vertical spacing is too tall. This is with Cascadia Code, but it reproduces with the default Lucida Console as well.

image

Note the gaps between the vertical bars.

Other terminals have better defaults and/or make this configurable. E.g. WT:

image

mintty commented 1 month ago

Click on the upper-left icon, Options - About - Whats' the version?

mintty commented 1 month ago

What are you actually running here? The title bar text does not sound like related to mintty at all.

tig commented 1 month ago

What are you actually running here? The title bar text does not sound like related to mintty at all.

A test app from https://github.com/gui-cs/Terminal.gui

image

mintty commented 1 month ago

An equivalent of that "Line height" setting is available in mintty: option RowSpacing. You can use negative values for it. And it's not the best idea to use ASCII pipe for border drawing. VT100 graphics or Unicode block graphics are a better choice, and they get special handling in mintty to avoid gaps. However, particularly Lucida Console has some broken design in the Box Drawing glyph range, which cannot be repaired by line spacing.

mintty commented 1 month ago

Checking text output, by the way, I do not agree that Lucida Console line height would be too tall. Changing the issue title accordingly.

tig commented 1 month ago

An equivalent of that "Line height" setting is available in mintty: option RowSpacing. You can use negative values for it. And it's not the best idea to use ASCII pipe for border drawing. VT100 graphics or Unicode block graphics are a better choice, and they get special handling in mintty to avoid gaps. However, particularly Lucida Console has some broken design in the Box Drawing glyph range, which cannot be repaired by line spacing.

Those glyphs in the screenshot are not ASCII pipe.

Here's with Lucida Console. Note corner rendinging issue (which may be a different issue).

image

mintty commented 1 month ago

I took a deeper look into the issue. (It appeared a bit strange to me at first because I do not have this experience - all is fine with my daily font DejaVuSans Mono.) It seems to be a font issue. I speculate Windows Terminal has a workaround, maybe it draws Unicode box graphics itself (I'll check their issues about it). In mintty, you can configure a workaround: FontChoice=PictoSymbols:2 Font2=Consolas (or any font you have with proper box graphics)

I could make mintty apply such a workaround automatically, but it would then override box graphics also with fonts that have a proper set of them...

mintty commented 1 month ago

Windows Terminal also used to have its problems with box graphics (https://github.com/microsoft/terminal/issues/14654) and even deliberately accepted that (https://github.com/microsoft/terminal/issues/5894#issuecomment-628292563) after considering options (https://github.com/microsoft/terminal/issues/5897) and it seems that they are now self-drawing them (https://github.com/microsoft/terminal/issues/5897#issuecomment-1947619243) but I don't see any related option in their complex settings menu.

mintty commented 1 month ago

A more specific workaround is: FontChoice=|Box Drawing:2 Font2=Consolas (or DejaVu Sans Mono if you have it)

This was discussed before: mintty/mintty#935, mintty/mintty#1119.