hyper-font-ligatures icon indicating copy to clipboard operation
hyper-font-ligatures copied to clipboard

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

Open cdhagmann opened this issue 5 years ago • 18 comments

cdhagmann avatar May 06 '19 15:05 cdhagmann

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 avatar May 06 '19 16:05 tolbertam

Possibly related? xtermjs/xterm.js#2028

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

tolbertam avatar May 07 '19 04:05 tolbertam

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 :crossed_fingers: . 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.

tolbertam avatar May 07 '19 05:05 tolbertam

FYI this workaround seems to do the trick on Windows. Just tested it on macOS, works fine too. https://github.com/zeit/hyper/issues/3607#issuecomment-489787741

r4dixx avatar May 23 '19 11:05 r4dixx

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.

tolbertam avatar May 23 '19 13:05 tolbertam

@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

lackdaz avatar May 29 '19 12:05 lackdaz

@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?

r4dixx avatar May 29 '19 15:05 r4dixx

I’ve been putting off upgrading my macOSX (10.12.6) because of some vm related issues with the latest versions of macOSX. Perhaps this might be a push. Yes I’ve done a full reload, are there any css parameters that you’ve put in too? I’m here because the x-row, x-screen css deprecation

On 29 May 2019, at 11:36 PM, r4dixx [email protected] wrote:

@lackdaz https://github.com/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 avatar May 29 '19 15:05 lackdaz

@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.

r4dixx avatar May 29 '19 16:05 r4dixx

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

I'm sorely missing my ligatures

lackdaz avatar May 29 '19 16:05 lackdaz

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.

tolbertam avatar May 31 '19 03:05 tolbertam

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!

lackdaz avatar May 31 '19 08:05 lackdaz

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.

Tylerwbrown avatar Jun 04 '19 08:06 Tylerwbrown

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.

tolbertam avatar Jun 12 '19 02:06 tolbertam

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

zoedsoupe avatar May 07 '20 01:05 zoedsoupe

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 avatar Aug 18 '21 20:08 jacob-israel-turner

Hey guys! I just introduced a PR that should resolve this issue, to an extent: https://github.com/tolbertam/hyper-font-ligatures/pull/11

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

jacob-israel-turner avatar Sep 05 '21 16:09 jacob-israel-turner

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

BitInByte avatar Nov 17 '21 19:11 BitInByte