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

Doesn't work on Hyper 3 unless you disable WebGL rendering #8

Open
cdhagmann opened this issue May 6, 2019 · 18 comments
Open

Doesn't work on Hyper 3 unless you disable WebGL rendering #8

cdhagmann opened this issue May 6, 2019 · 18 comments
Assignees

Comments

@cdhagmann
Copy link

No description provided.

@tolbertam tolbertam self-assigned this May 6, 2019
@tolbertam
Copy link
Owner

tolbertam commented May 6, 2019

Thanks for the report. I tried hyper 3 out and it looks like onDecorated is no longer being exposed (EDIT: You can probably ignore this statement, that doesn't seem unusual). I'm traveling today, but I'll look at it tomorrow.

@tolbertam
Copy link
Owner

Possibly related? xtermjs/xterm.js#2028

I'll try a local build of hyper with xterm with that fix and see how it goes! 🤞

@tolbertam
Copy link
Owner

tolbertam commented May 7, 2019

This may be a bit trickier than anticipated. It looks like hyper is using a fork of xterm.js (https://github.com/zeit/xterm.js), I tried merging recent xterm.js changes into it and doing a custom build, but it's not much of a trivial exercise.

The aforementioned issue I mentioned probably isn't related, since the hyper fork is based on xterm 3.12.0 with the WebGL renderer work that is not yet merged into xterm proper, and the issue was opened about a regression in 3.13 beta.

This plugin itself doesn't do much, it simply uses xterm-addon-ligatures, so we'll mostly be at the mercy of xterm. I suspect it's possible that the WebGL renderer isn't currently taking into account ligatures, and that project has done an excellent job supporting ligatures in the first place, so I bet at some point this plugin will start working again 🤞 . I'll add a note to the README that this plugin is currently broken on Hyper 3 and also keep an eye on xterm development.

@r4dixx
Copy link

r4dixx commented May 23, 2019

FYI this workaround seems to do the trick on Windows. Just tested it on macOS, works fine too. vercel/hyper#3607 (comment)

@tolbertam
Copy link
Owner

Thanks @r4dixx, didn't see that issue as it was closed before I opened up this one. Good to have that as a cross reference, will update the docs to reflect this.

@lackdaz
Copy link

lackdaz commented May 29, 2019

@r4dixx Just to be certain, adding webGLRenderer: false under your config: with this plugin installed brings back ligatures?

I'm running MacOSX and this doesn't seem to be the fix

@r4dixx
Copy link

r4dixx commented May 29, 2019

@lackdaz Yup, works for me at least. I cannot tell for sure if it works for others. I'm running the very latest stable versions of both macOS and Hyper. Works for me with this plugin installed. Have you performed a full reload?

@lackdaz
Copy link

lackdaz commented May 29, 2019 via email

@r4dixx
Copy link

r4dixx commented May 29, 2019

@lackdaz I didn't add/change anything in .hyper.js except:

module.exports = {
  config: {
    webGLRenderer: false
  },
  plugins: [
    "hyper-font-ligatures"
  ],
};

No custom css, termCSS, or anything, sorry.

Hyper 3.0.2 (stable)
hyper-font-ligatures (0.0.7)

And macOS Mojave 10.14.5 (18F203) but I wouldn't know if it is related to your OS version or not.

@lackdaz
Copy link

lackdaz commented May 29, 2019

That's useful information. I'll try it out and keep you posted! Thanks!

I'm sorely missing my ligatures

@tolbertam tolbertam changed the title Doesn't work on Hyper 3 Doesn't work on Hyper 3 unless you disable WebGL rendering May 31, 2019
@tolbertam
Copy link
Owner

tolbertam commented May 31, 2019

I tested this on Linux and it looks to work there as well! I updated the README with the guidance provided here and published a 0.0.8 release (so documentation on npm includes this).

I'll leave this open for the time being, as I imagine others will encounter this and seeing an already open issue may help point them in the right direction.

@lackdaz
Copy link

lackdaz commented May 31, 2019

It was my mistake, I upgraded to Mojave but I had the webGLRenderer: false beneath plugins and hence not within config

I can confirm that this is fixed now and I would willingly trade ligatures for kernel cycles 👯‍♂

Doh!

@Tylerwbrown
Copy link

For me disabling the webGLRenderer does bring back ligatures, but has a significant impact on performance. I'm not able to do things that were possible before.

I noticed this after having 2 vim tabs open and trying to open a third to run something, it started being incredibly slow, even just opening a new hyper window and spamming new terminal tabs starts being incredibly slow after 4 tabs open, but not with webGLRenderer enabled.

@tolbertam
Copy link
Owner

For me disabling the webGLRenderer does bring back ligatures, but has a significant impact on performance. I'm not able to do things that were possible before.

I recently noticed precisely the same, particularly when using vim as you mentioned, and also doing some other interactive tasks. I think the plugin is a bit at the mercy of hyper & xterm here.

@zoedsoupe
Copy link

I'd disabled webGLRenderer but ligatures doesn't work :/

@jacob-israel-turner
Copy link

jacob-israel-turner commented Aug 18, 2021

On a fresh install, it doesn't appear that disabling WebGL is required anymore!

EDIT: Scratch that - turns out WebGL rendering is turned off by default on new Hyper installations. Turning it on does indeed break this plugin.

@jacob-israel-turner
Copy link

Hey guys! I just introduced a PR that should resolve this issue, to an extent:
#11

There are still known issues with WebGL and Ligatures, but in my experience it's still very usable.

@BitInByte
Copy link

Hey guys, there are any plans to fix this in hyper 3 with WebGL enabled? I would like to have it :)

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

No branches or pull requests

8 participants