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

Line Spacing Issues #475

Closed
uudruid74 opened this issue Jan 13, 2017 · 9 comments
Closed

Line Spacing Issues #475

uudruid74 opened this issue Jan 13, 2017 · 9 comments
Assignees
Labels
type/bug Something is misbehaving
Milestone

Comments

@uudruid74
Copy link

There are some odd line spacing issues. The line spacing is set at 21px in the demo, but this makes spaces between the lines. Setting it to 18px will get rid of the spaces, but now mouse coordinates are all off since they are based on the 21px line height. Worse, some apps (like htop - see screenshot) display the status bar half-over the bottom of the terminal. I think these are related.

Details

  • Chrome 53
  • OS version: Antergos(Arch) Linux
  • xterm.js version: git ... 2.2.3-99-gfc528f6

Here's HTOP hanging over the edge
screenshot from 2017-01-13 02-17-13

Here is Midnight Commander looking awful (spaces between lines):
screenshot from 2017-01-13 02-44-36

And the expected behavior of Midnight Commander (shown in shellinabox, colors set to linux terminal):
screenshot from 2017-01-13 02-44-59

@uudruid74
Copy link
Author

After pulling down some menu items, you'll notice that some lines get "out of sync" with the ones next to them and the statusbar line starts creeping lower on the screen, spilling over like the HTOP display. TMUX will eventually do the same and have a statusbar way below the actual terminal screen. The mouse support of xterm.js is a lot bettter than shellinabox though!

screenshot from 2017-01-13 03-08-39

@Tyriar
Copy link
Member

Tyriar commented Jan 13, 2017

@parisk parisk self-assigned this Jan 16, 2017
@parisk parisk added the type/bug Something is misbehaving label Jan 16, 2017
@parisk
Copy link
Contributor

parisk commented Jan 16, 2017

@uudruid74 can you confirm if this happens on master?

@uudruid74
Copy link
Author

ekl@Taro ~/Programming/xterm.js/demo (git)-[master] % git describe
0.31-615-gfc528f6

@Tyriar
Copy link
Member

Tyriar commented Jan 17, 2017

I can't repro these line spacing issues on Windows, Mac or Linux on the demo. Do you have any other CSS on the page that could affect this?

I also recommend checking on the latest master since your commit seems a little out of date.

@uudruid74
Copy link
Author

This is just running the installed demo - no changes whatsoever. Linux Chrome 53 and running demo via localhost.

xterm@2.2.3 start /home/ekl/Programming/xterm.js
node demo/app

ekl@Taro ~/Programming/xterm.js (git)-[master] % git describe :(
0.31-670-g5bd8033

Still the same!

FIX: I changed the fonts being used by adding the following to the stylesheet.

font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, "Andale Mono", monospace;

It's the set I use with shell-in-a-box, so apparently courier is suspect on this system. I think on some systems, Courier looks monospace, but actually isn't.

@wayerr
Copy link

wayerr commented Mar 22, 2017

I found same issue, it appeared on debian linux in ff 52.0.1, but not exists in cromium 57.0.2987.98 on same os. See attached screenshot:
spectacle tj8462
Browsers choose different fonts (it strange) and different line height .

@wayerr
Copy link

wayerr commented Mar 22, 2017

Explanation show that 'line' span-s (which act as background color) has height 16px
screenshot_20170322_165429
when must have 17px, it may be fixed by additional css:

.xterm-rows span {
    display: inline-block;
}

but i`m not sure that is right way.

@mofux
Copy link
Contributor

mofux commented Mar 22, 2017

I can reproduce the problem above, and @wayerr solution seems to work very well, as it does not change the height of the surrounding div. I guess the only problem with using inline-block vs inline would be the wrapping behaviour on text overflow, but that should actually never happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is misbehaving
Projects
None yet
Development

No branches or pull requests

5 participants