xterm.js icon indicating copy to clipboard operation
xterm.js copied to clipboard

Some ligature characters are wider than normal

Open LabhanshAgrawal opened this issue 4 years ago • 9 comments

We're using this addon in hyper For characters which have ligatures when they are repeated (-, #, = etc.), if you have a large number of them (eg. in loading bar during yarn install) the slight increase in width becomes apparent and the text gets ahead of the cursor, then on typing some different character, it renders in the correct place. But ends up overlapping with the earlier characters as they are also there. Eg.

Here the top one is with the addon and bottom one without. Same string ########################################################] is pasted in both.

Details

  • Browser and browser and/or electron version: Electron 7.1.9
  • OS version: macOs Catalina 10.15.3
  • xterm.js version: 4.4.0
  • xterm-addon-ligatures version: 0.2.1
  • Font: Fira Code

Steps to reproduce

Put the string ########################################################] with some font which has ligatures for ## (or any such character, I tested with #, - and =), the ] will overlap #s

P.S. I couldn't test with any other app as I don't know which ones are using it, and this addon was not available in the xterm demo. P.P.S. If you want to check it in hyper, use the ci build from here as stable release doesn't have ligatures yet.

LabhanshAgrawal avatar Feb 17 '20 11:02 LabhanshAgrawal

@princjef @Tyriar Can you please take a look at this.

LabhanshAgrawal avatar Feb 19 '20 14:02 LabhanshAgrawal

I guess this is a regression in 4.4? We should really handle https://github.com/xtermjs/xterm.js/issues/2726 so it's available in the demo and to avoid future regressions like this. I don't be able to work on this for a while.

Tyriar avatar Feb 19 '20 14:02 Tyriar

Happens with 4.3.0 also

LabhanshAgrawal avatar Feb 19 '20 14:02 LabhanshAgrawal

Just checked with 4.1.0 and this issue is there also 😔.

LabhanshAgrawal avatar Feb 19 '20 14:02 LabhanshAgrawal

Ah ok, thanks for letting us know.

Tyriar avatar Feb 19 '20 18:02 Tyriar

@Tyriar any update on this or any issue to track this on the main repo I can watch?

LabhanshAgrawal avatar Mar 25 '20 13:03 LabhanshAgrawal

No update, this issue tracks moving this repo into the main repo https://github.com/xtermjs/xterm.js/issues/2726 which is probably the next step for ligatures.

Tyriar avatar Apr 06 '20 11:04 Tyriar

This seems to be only there for the canvas renderer. Doesn't seem to happen in DOM or WebGL (Tested on the demo).

LabhanshAgrawal avatar Apr 02 '21 20:04 LabhanshAgrawal

I have still this issue with the canvas Renderer

SquitchYT avatar Feb 26 '22 09:02 SquitchYT