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

Font ligatures don't work v3 #3607

Open
2 tasks done
orangecoloured opened this issue May 6, 2019 · 60 comments · Fixed by #3853
Open
2 tasks done

Font ligatures don't work v3 #3607

orangecoloured opened this issue May 6, 2019 · 60 comments · Fixed by #3853

Comments

@orangecoloured
Copy link

  • I am on the latest Hyper.app version
  • 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 #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.

@mhall
Copy link

mhall commented May 6, 2019

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.

@orangecoloured orangecoloured changed the title Font ligatures don't work Font ligatures don't work v3 May 6, 2019
@orangecoloured
Copy link
Author

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

@nurtext
Copy link

nurtext commented May 8, 2019

@orangecoloured So why did you close this bug?

@orangecoloured
Copy link
Author

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

@nurtext
Copy link

nurtext commented May 8, 2019

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

@mhall
Copy link

mhall commented May 8, 2019

Yeah, I would recommend reopening this as well.

@depadiernos
Copy link

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.

@GitSquared
Copy link
Contributor

GitSquared commented Sep 17, 2019

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.

@nurtext
Copy link

nurtext commented Sep 27, 2019

@GitSquared Looks like they're already on it: #3830

@Stanzilla
Copy link
Collaborator

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

@GitSquared
Copy link
Contributor

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

@alexgalkin1994
Copy link

Does not work for me, even with WebGL disabled.

@GitSquared
Copy link
Contributor

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

@Stanzilla Stanzilla reopened this Oct 12, 2019
@Stanzilla
Copy link
Collaborator

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

@GitSquared
Copy link
Contributor

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

Screenshot_20191012_170136

@Stanzilla
Copy link
Collaborator

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

@Stanzilla Stanzilla pinned this issue Oct 12, 2019
@LabhanshAgrawal
Copy link
Collaborator

Working for me on mac (also using Fira Code)

@alexgalkin1994
Copy link

alexgalkin1994 commented Oct 13, 2019

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

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

@GitSquared
Copy link
Contributor

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

@bet4it
Copy link
Contributor

bet4it commented Mar 26, 2020

@IceMan81 You should try this in the integrated terminal provided by VSCode.

@Stanzilla
Copy link
Collaborator

Oh damn it, good call, I did not actually look at the screenshot -.-

@IceMan81
Copy link

@IceMan81 You should try this in the integrated terminal provided by VSCode.

Do you need to do something to enable ligatures for the integrated terminal in VSCode?

@IceMan81
Copy link

Another example of the weird behavior. See how the right arrows are behaving.

image

@IceMan81
Copy link

@IceMan81 You should try this in the integrated terminal provided by VSCode.

Do you need to do something to enable ligatures for the integrated terminal in VSCode?

It looks like VSCode's integrated terminal does not currently support ligatures. There used to be a ligatures setting which has been disabled.
microsoft/vscode#34103

@Tyriar
Copy link
Contributor

Tyriar commented Apr 17, 2020

@Stanzilla btw vscode's terminal doesn't support ligatures, it never ended up making it that far and the work on the addon has pretty much all been external. It may be broken on some renderers now I'm not sure, that's because we're waiting on xtermjs/xterm.js#2847 so it can stay up to date.

@Stanzilla
Copy link
Collaborator

That explains that, thank you

@MarkLyck
Copy link

Screen Shot 2020-06-21 at 16 24 31

Ligatures still aren't working for me on 3.1.0-canary4

I have tried with several powerline fonts including Fira Code, with and without hyper-font-ligatues, with and without webGLRenderer enabled.

I just get these square boxes.

@regisbsb
Copy link

Looks like xtermjs/xterm.js#2847 is merged now.

@dhouck
Copy link

dhouck commented Aug 17, 2020

If ligatures are merged upstream whatʼs the next step here then?

@necromancerthedark
Copy link

necromancerthedark commented Nov 30, 2020

Another example of the weird behavior. See how the right arrows are behaving.

image

I am getting same problem now! can anybody suggest something to fix it? arrow symbol works only sometimes! I am on Windows.

vorburger added a commit to vorburger/FiraCode that referenced this issue Dec 6, 2020
tonsky pushed a commit to tonsky/FiraCode that referenced this issue Dec 6, 2020
@jaanli
Copy link

jaanli commented Jan 12, 2021

Also having this issue with Fira Code from nerd fonts:

image

@Mantrayana
Copy link

Also happens to me on macOS Catalina with vanilla installation, is there a fix? It's the only thing that prevents me from using Hyper regularly.

@Abusagit
Copy link

Abusagit commented Jun 6, 2021

Hello everyone, removing the qoutes in fonts settings in .hyper.js accidently worked for me, but when I tried to reset it and redo for making some guide for you, guys, it didn`t work for the second time. Also it worked when I removed another qoutes from other fonts in the list but for one single terminal run. I had idea about wrong font recognition because of those quotes, nevertheless now I guess they are used for multi-word-fonts.

So it`s not the solution yet... But you can try.
1

@Abusagit
Copy link

Abusagit commented Jun 6, 2021

And also it doesn`t work fine while are being typed by me but when they are represented everything is fine

Seems little broken:
image

@ryanerwin
Copy link

Also having this issue with Fira Code from nerd fonts:

image

Using "Hack Nerd Font" on Ubuntu 21.04 with Hyper 3.0.2, I'm getting the same powerline alignment issue that @altosaar reported.

image

@leerob leerob unpinned this issue Jun 10, 2021
@jezmck
Copy link
Contributor

jezmck commented Aug 11, 2021

Not working for me with latest version on MacOS, and with no changes to the settings other than:

...
        fontFamily: '"Fira Code", Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
...

image

@jacob-israel-turner
Copy link

jacob-israel-turner commented Aug 24, 2021

I'm confused why this is still an issue - it seems that xterm.js has resolved most issues with ligatures:
xtermjs/xterm.js#3286
xtermjs/xterm.js#2847

Is there a bug in Hyper that's preventing ligatures from working?

Turning off WebGL is, unfortunately, a non-starter for a lot of us. The stuttering caused by using Vim in Canvas gives me a headache.

EDIT: Looks like we're just not enabling ligatures if webgl is enabled:

if (props.disableLigatures !== true && !useWebGL) {

EDIT2: I tried updating that line to ignore the WebGL check, but ligatures still appear broken. Might need a core contributor to dig into this.

EDIT3: Figured it out, had wonky config locally. Here's a PR to enable ligatures with the WebGL renderer! #5888

CC: @Stanzilla @GitSquared since you both seemed invested in this issue.

jacob-israel-turner added a commit to jacob-israel-turner/jt-vim-config that referenced this issue Aug 24, 2021
For performance reasons.  This makes ligatures break. Tracking in this
issue:

vercel/hyper#3607
@LabhanshAgrawal
Copy link
Collaborator

We're not enabling ligatures with webgl as it's causing issues with rendering #5757

@jacob-israel-turner
Copy link

jacob-israel-turner commented Sep 5, 2021

@LabhanshAgrawal has requested that we not enable WebGL + Ligatures in hyper directly, so I've instead opened a PR with hyper-font-ligatures that enables WebGL + Ligatures: tolbertam/hyper-font-ligatures#11

EDIT: As I'm playing with this again, I'm seeing more issues than I thought. Especially while using Vim. The WebGL + Ligature combination appears to be better than what's been released, but people should still be cautious when enabling both.

@thoernle
Copy link

thoernle commented Jun 5, 2023

Has this issue been resolved? This was the reason I stopped using Hyper

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