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

Rendering of certain whole-screen applications (like mc) is broken. #60

Open
fperez opened this issue Feb 14, 2015 · 2 comments
Open

Rendering of certain whole-screen applications (like mc) is broken. #60

fperez opened this issue Feb 14, 2015 · 2 comments

Comments

@fperez
Copy link

fperez commented Feb 14, 2015

Context

This originated as ipython/ipython#7782 on IPython, but it seems that it's better reported directly here. IPython uses term.js purely as a component, wrapped in terminado, a Tornado-based async server. It then exposes the terminals in the IPython Notebook application.

The issue

On Chrome on Linux, if I set the Consolas font to being my monospaced font, when running mc (Midnight Commander) in the terminal, the computation of the column width must be wrong, b/c the page misrenders:

image

This is even more evident when an error box is drawn:

image

Checking the value of Terminal.brokenBold in the JS Console returns true with Consolas. Yet, the fix in ipython/ipython#7242 isn't helping here.

For reference, switching to another monospaced font, such as DejaVu Sans Mono, fixes the problem. So at least there's a workaround.

But even if the bug is in Consolas, it would be nice if we could make it work correctly (if viable). Regular terminal emulators don't exhibit this behavior. As noted by @takluyver in ipython/ipython#7242, this may not be easily fixable without way too much work. If that's the case, so be it, at least this will document the problem for future users.

ps - for extra details on this issue from the IPython side, see ipython/ipython#7242.

@chjj
Copy link
Owner

chjj commented Feb 14, 2015

Are you certain that is a monospace font?

brokenBold is there to check whether the browser makes monospace characters "bigger" when boldened, i.e. they push other elements aside more. Obviously for a terminal to work, characters need to be aligned properly. I don't think that's what is happening here though if brokenBold is true (and I don't see any bold text there).

@fperez
Copy link
Author

fperez commented Feb 14, 2015

Consolas is one of Microsoft's monospaced fonts.

Here are examples of the same screenshots above, using Consolas, on a regular terminal emulator:

image

and the error box:

image

Now, I'm not saying it's not a buggy monospaced font :) But I've used it for many years successfully in my terminal emulators and in Emacs, without this problem. Hope this helps...

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