Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box drawing shows gaps with some fonts #353

Open
tig opened this issue Jul 25, 2024 · 9 comments
Open

Box drawing shows gaps with some fonts #353

tig opened this issue Jul 25, 2024 · 9 comments

Comments

@tig
Copy link

tig commented Jul 25, 2024

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
Copy link
Owner

mintty commented Jul 25, 2024

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

@mintty
Copy link
Owner

mintty commented Jul 25, 2024

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

@tig
Copy link
Author

tig commented Jul 25, 2024

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
Copy link
Owner

mintty commented Jul 25, 2024

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
Copy link
Owner

mintty commented Jul 25, 2024

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

@mintty mintty changed the title Font height is too tall Lucida Console box drawing shows gaps Jul 25, 2024
@tig
Copy link
Author

tig commented Jul 25, 2024

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 mintty changed the title Lucida Console box drawing shows gaps Box drawing shows gaps with some fonts Jul 26, 2024
@mintty
Copy link
Owner

mintty commented Jul 26, 2024

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
Copy link
Owner

mintty commented Jul 26, 2024

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

@mintty
Copy link
Owner

mintty commented Aug 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants