Replies: 2 comments 7 replies
-
Actually, it does seem like this is reproducible in a sandbox: https://codesandbox.io/p/sandbox/xtermjs-test-forked-chl7kj |
Beta Was this translation helpful? Give feedback.
-
This looks like a font issue to me. What is your current font being used? On what browser engine? Which system? Background on this - the terminal does an initial measurement of 'W' chars to get the basic cell size for your current font settings. Later on, every char to be rendered gets compared to those metrics and corrected by letter-spacing to form a perfect grid. For some reason your other char metrics differ from the W-metrics by a tiny amount. Ideally this should not be the case for a proper monospace font. Those tiny differences stack up and lead to the total width being 1 or 2 pixels too short (thats at least what it looks like in your case). What really causes those tiny differences is unclear - can be the font itself or your font renderer in the browser. Maybe try a different font? Also make sure not to mess with custom CSS font rules/settings on the terminal container (e.g. kerning rules must be off). |
Beta Was this translation helpful? Give feedback.
-
I've noticed that xterm.js's default rendering has resulted in characters being slightly truncated on the right side. If I manually disable
overflow: hidden
on a line, you can see that the last letter slightly overflows the line:If I disable the
letter-spacing
property on both the individual line and on the.xterm-rows
container, then the text seems to fit within the line:Does anyone have advice on what might be causing this and how should I debug it? I wasn't able to reproduce the issue in a codesandbox easily, so it must be something else about my app / CSS that's triggering the issue, but I don't know where to look. Any help appreciated 🙏 Thanks!
This was encountered in Chrome 130.0.6723.117 on macOS 15.1.
Beta Was this translation helpful? Give feedback.
All reactions