Xterm.js: Some ligature characters are wider than normal

Created on 17 Feb 2020  路  7Comments  路  Source: xtermjs/xterm.js


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.

areaddoligatures typbug

All 7 comments

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

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.

Happens with 4.3.0 also

Just checked with 4.1.0 and this issue is there also 馃様.

Ah ok, thanks for letting us know.

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tyriar picture Tyriar  路  4Comments

tandatle picture tandatle  路  3Comments

7PH picture 7PH  路  4Comments

jerch picture jerch  路  3Comments

Mlocik97-issues picture Mlocik97-issues  路  3Comments