IonicaBizau / web-term

:tv: A fullscreen terminal in your browser.
MIT License
168 stars 21 forks source link

Correcting terminal height problem #26

Closed lcristianiim closed 8 years ago

lcristianiim commented 8 years ago

Fixes #25 This should fix the terminal height with the prompt going off the bottom of the page. @IonicaBizau please check it out.

IonicaBizau commented 8 years ago

Hmm, really? :smile:

lcristianiim commented 8 years ago

Yeah. It just works.

IonicaBizau commented 8 years ago

Hmm, with the Monaco font?

Here is what I got:

image

lcristianiim commented 8 years ago

hmm.. thats strange image image

IonicaBizau commented 8 years ago

From debugging, I saw that the char height is 11 while the row height is 12. That's the reason. By just adding + 1

Changing this into something like y: Math.floor(targetSize.height / (charSize.height + 1)) solves the problem for me, Monaco font, but it fails it for the monospace font. :sob:

lcristianiim commented 8 years ago

Now it should also work in Chrome.