Xterm.js: Changing the font size makes selection incorrect

Created on 12 Jul 2017  路  5Comments  路  Source: xtermjs/xterm.js

Changing the font size to 15px makes the selection incorrect in xterm 2.8.1.
Is there any proper way to set the font size to terminal?
screen shot 2017-07-12 at 7 40 03 pm

typquestion

All 5 comments

When you change the font size you need to tell xterm.js to resize, whether that be by manually calling Terminal.resize or by using the fit addon.

@Tyriar I used fit addon. But even after that selection is incorrect. I changed font size directly in xterm.css file. Is this the right way to change or is there any other proper way to change font size?

@ManojkumarV you should avoid changing the font size in the files of the library.

You should include your own stylesheets that override xterm.js' styles.

Also if you can provide a minimal jsfiddle example to see your issue, that would help 馃槃.

@parisk I found a workaround for my need. I just changed the font size of the parent element of the xterm container and xterm took the font size of its parent and now the selection is working fine 馃槃
Thanks a lot for your reply 馃槂

Happy to hear it worked out at last!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LB-J picture LB-J  路  3Comments

jestapinski picture jestapinski  路  3Comments

Mlocik97-issues picture Mlocik97-issues  路  3Comments

zhangjie2012 picture zhangjie2012  路  3Comments

fabiospampinato picture fabiospampinato  路  4Comments