Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop when drawing large ligatures to char atlas #4362

Open
LabhanshAgrawal opened this issue Jan 2, 2023 · 0 comments · May be fixed by #4386
Open

Infinite loop when drawing large ligatures to char atlas #4362

LabhanshAgrawal opened this issue Jan 2, 2023 · 0 comments · May be fixed by #4386

Comments

@LabhanshAgrawal
Copy link
Contributor

some fonts provide extremely long ligatures, e.g. Fira Code for ===================================================
The char atlas code tries to find a row to fit it but fails and gets stuck in an infinite loop

// If there is not enough room in the current row, finish it and try again
if (activeRow === activePage.currentRow) {
activeRow.x = 0;
activeRow.y += activeRow.height;
activeRow.height = 0;
} else {
activePage.fixedRows.splice(activePage.fixedRows.indexOf(activeRow), 1);
}

^Here we're checking if there's room on the current row and creating a new one if not.

Details

  • Browser and browser version: chrome 108
  • OS version: macOS 12
  • xterm.js version: 5.1.0 (also on latest master branch)

Steps to reproduce

  1. Install Fira Code font, Run the xterm demo and enable ligatures
  2. start typing =
  3. Keep looking at the char atlas drawn below, once the glyph is almost the same width as char atlas, typing the next = will freeze everything.

Screenshot 2023-01-02 at 13 32 47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants