hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Font ligatures don't work v3

Open orangecoloured opened this issue 6 years ago • 66 comments

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: 10.14.4 macOS Mojave
  • Hyper.app version: 3.0.0
  • Link of a Gist with the contents of your .hyper.js:
  • Relevant information from devtools (CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere):
  • The issue is reproducible in vanilla Hyper.app: Is Vanilla or with the hyper-font-ligatures add-on.

Issue

I'm using Fira Code font and the ligatures don't work. I found this issue https://github.com/zeit/hyper/issues/914 and tried installing the hyper-font-ligatures add-on or adding this css

termCSS: `
  x-screen x-row {
    font-variant-ligatures: initial;
  }
`,

but none of these seem to work.

orangecoloured avatar May 06 '19 20:05 orangecoloured

At least on Windows 10, setting webGLRenderer: false in your config file will bring them back (assuming you still have the hyper-font-ligatures plugin installed). This will also fix some of the other rendering anomalies of v3, although sadly not all.

mhall avatar May 06 '19 21:05 mhall

Oh. Yes, working now. So, ligatures in exchange for performance :)

orangecoloured avatar May 06 '19 21:05 orangecoloured

@orangecoloured So why did you close this bug?

nurtext avatar May 08 '19 16:05 nurtext

@nurtext Because technically this bug was resolved. The ligatures work without WebGL renderer. I think another issue should be created addressing this.

orangecoloured avatar May 08 '19 16:05 orangecoloured

@orangecoloured I understand, but for me it's still open because turning off the newly introduced renderer isn't a valid fix. Ever tried tailing or cating some logs with the old renderer? It made Hyper almost useless for me. Now Hyper is back in the game (at least for me), but ligatures are a must have in 2019 IMHO.

nurtext avatar May 08 '19 16:05 nurtext

Yeah, I would recommend reopening this as well.

mhall avatar May 08 '19 16:05 mhall

So, based on this comment, looks like there's a fix for this in xterm.js. Would be really awesome to get that pulled in so ligatures will work without a performance hit.

depadiernos avatar Aug 05 '19 07:08 depadiernos

xTerm 4 supports this through the new Addon system: https://github.com/xtermjs/xterm-addon-ligatures

However, the xterm fork used by Hyper is severely out of date: 56 commits ahead, 1290 commits behind.

Edit: Switching the fork for latest xTerm works... except the WebGL renderer is quite broken - I believe it should be possible to fix it but I haven't researched that much. Also, the fork contains valuable work that needs to be rebased on xterm@4.

GitSquared avatar Sep 17 '19 15:09 GitSquared

@GitSquared Looks like they're already on it: https://github.com/zeit/hyper/pull/3830

nurtext avatar Sep 27 '19 09:09 nurtext

@GitSquared our effort in that PR is currently stuck on broken resizing

Stanzilla avatar Sep 27 '19 20:09 Stanzilla

Now that #3830 has been merged, I'm sending a PR for enabling font ligatures.

GitSquared avatar Oct 09 '19 09:10 GitSquared

Does not work for me, even with WebGL disabled.

alexgalkin1994 avatar Oct 11 '19 15:10 alexgalkin1994

@alexgalkin1994 You're testing on the canary version, right?

GitSquared avatar Oct 11 '19 16:10 GitSquared

Reopening since I don't see them working as well here, something broke during the Electron update?

Stanzilla avatar Oct 12 '19 14:10 Stanzilla

@Stanzilla They still work for me under Linux, could this be platform-specific? (Still using Fira Code.)

Screenshot_20191012_170136

GitSquared avatar Oct 12 '19 15:10 GitSquared

Could be yea, anything known about issues with that on Windows @Tyriar?

Stanzilla avatar Oct 12 '19 15:10 Stanzilla

Working for me on mac (also using Fira Code)

LabhanshAgrawal avatar Oct 12 '19 15:10 LabhanshAgrawal

@alexgalkin1994 You're testing on the canary version, right?

I installed it via Homebrew. (brew cask install hyper) Version 3.0.2 is installed

alexgalkin1994 avatar Oct 13 '19 20:10 alexgalkin1994

@alexgalkin1994 That's the latest release. This issue has been closed on the canary branch, which is the development version - ligatures will be enabled in the next release.

GitSquared avatar Oct 14 '19 06:10 GitSquared

I upgraded to Hyper 3.0.1-canary.4 (canary) on macOS and I'm using the Nerd Fonts version of Fira Code, and I also tried Pragmata Pro Mono Liga and I don't see ligatures.

obahareth avatar Dec 23 '19 13:12 obahareth

You need to use a build from CI or compile your own

Stanzilla avatar Dec 23 '19 13:12 Stanzilla

Oh alright, thanks @Stanzilla!

obahareth avatar Dec 23 '19 13:12 obahareth

Just built (yarn run dev) and ran (yarn run app) the latest on canary (f40496f). I can see ligatures with fontFamily set to "Fira Code", but not with any of the variants of either Iosevka or PragmataPro that I've tried. I assume either should work (they properly work in VS Code/IDEA), what might I be doing incorrectly?

lispy avatar Dec 29 '19 05:12 lispy

any idea when this will become live for everyone?

dagadbm avatar Jan 16 '20 14:01 dagadbm

Sadly not

Stanzilla avatar Jan 16 '20 14:01 Stanzilla

Will the fix in canary make it into 3.0.1? Can a build be put out for this fix? I couldn't find any build artifacts on CI.

IceMan81 avatar Mar 24 '20 21:03 IceMan81

No, not soon, for which OS are you looking for?

Stanzilla avatar Mar 24 '20 22:03 Stanzilla

MAC OS

IceMan81 avatar Mar 24 '20 22:03 IceMan81

Can you try this then? https://github.com/zeit/hyper/releases/tag/v3.1.0-canary.3

Stanzilla avatar Mar 24 '20 22:03 Stanzilla

Should that be v3.1.0-canary.5? since v3.1.0-canary.4 is already published

IceMan81 avatar Mar 24 '20 22:03 IceMan81