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?

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!