question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some ligature characters are wider than normal

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Tyriarcommented, Feb 19, 2020

Ah ok, thanks for letting us know.

1reaction
LabhanshAgrawalcommented, Feb 19, 2020

Happens with 4.3.0 also

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inconsistent rendering of double-width characters and ligatures
As you can see double-width glyphs (some of the symbols in the statusline) are rendered at 50% of their size. The [ERR] ligature...
Read more >
Ligature (writing) - Wikipedia
In writing and typography, a ligature occurs where two or more graphemes or letters are joined to form a single glyph. Examples are...
Read more >
ligature question - Microsoft Community
The "Historical" ligatures will tend to have more flourishes, more swoops, ... that are available for certain characters in some fonts.
Read more >
Adjust character spacing in Pages on Mac - Apple Support
Another way to affect character spacing is to use ligatures, a decorative joining of two characters to form a single typographic character.
Read more >
How is it possible that the HorizontalAdvance of a glyph is ...
I noticed that the HorizontalAdvance of the chars 'f', 'w', 'y', 'A', '/', '\' is smaller than their normal width and the VerticalAdvance...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found