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

Disable selected ligatures #670

Closed
DNF2 opened this issue Oct 10, 2018 · 9 comments
Closed

Disable selected ligatures #670

DNF2 opened this issue Oct 10, 2018 · 9 comments

Comments

@DNF2
Copy link

DNF2 commented Oct 10, 2018

Julia uses dotted operators extensively to broadcast operations (basically vectorizing them.) Any operator can have a dot added to it, and this includes all unicode operators as well.

Fira Code has ligatures for a small number of dotted operators, namely .- and .= (as far as I know). In code that looks inconsistent:
screenshot 2018-10-10 at 14 05 50

Since there is no realistic way that ligatures can be added for all allowable operators, is it possible to disable the ligatures for .= and .-?

@tonsky
Copy link
Owner

tonsky commented Oct 10, 2018

thanks, I’ll consider this

@curran
Copy link

curran commented Mar 18, 2019

FWIW, I've managed to disable selected ligatures by running https://github.com/ToxicFrog/Ligaturizer on the original Fira Mono, with custom configuration.

@marius311
Copy link

@curran any chance you could share more on how you did this?

This is such a beautiful font for Julia except for this issue unforuntatley, as broadcasting is ubiquitous.

@curran
Copy link

curran commented May 22, 2020

@marius311 You can comment out certain ligatures in this file https://github.com/ToxicFrog/Ligaturizer/blob/master/ligatures.py , then run the build process to generate the font with commented out ligatures not present.

This is also mentioned in the README https://github.com/ToxicFrog/Ligaturizer#automatic

This repo that adds only the arrow ligatures to Ubuntu Mono may be of interest: https://github.com/datavis-tech/ubuntu-mono-ligaturized/tree/master/arrowized

It shows you can remove pretty much everything from that ligatures.py file and it will work just fine https://github.com/datavis-tech/ubuntu-mono-ligaturized/blob/master/arrowized/ligatures.py

@pag
Copy link

pag commented Nov 4, 2021

Another straightforward way to remove the ligatures of your choice:

  • Clone this repo
  • Install the prerequisites for running the font build script (sh scripts/bootstrap_macos.sh or bootstrap_linux.sh)
  • Confirm that you can generate the font files that you want (e.g. sh scripts/build_ttf.sh)
  • Open FiraCode.glyphs in a text editor, find the line name = calt;, then in the long line above that delete the ligatures that you want. For example, to remove the ligature ~> ⇝ (which makes my shell prompt look silly and ruins the highlighting there), find the part in that line starting from lookup asciitilde_greater and delete to the end of the block, i.e. the end of the next \012\012.
  • Generate the font files.

tonsky added a commit that referenced this issue Nov 29, 2021
tonsky added a commit that referenced this issue Nov 29, 2021
tonsky added a commit that referenced this issue Nov 29, 2021
tonsky added a commit that referenced this issue Nov 29, 2021
@tonsky
Copy link
Owner

tonsky commented Nov 29, 2021

Moved both .- and .= to character variants in v6

@tonsky tonsky closed this as completed Nov 29, 2021
@jhpratt
Copy link

jhpratt commented Nov 30, 2021

Hi @tonsky, could you check that .= is correct? After upgrading to v6, all ligatures/variants work as expected except this one, which seems to be always enabled. I've checked both in VS Code (without it explicitly enabled) and in gedit, which as far as I can tell doesn't have an option to change the default ligatures.

@tonsky
Copy link
Owner

tonsky commented Nov 30, 2021

Screenshot 2021-11-30 at 10 49 25

Screenshot 2021-11-30 at 10 49 34

@jhpratt
Copy link

jhpratt commented Nov 30, 2021

Hm. Glad to see that it's working as expected, but now I'm wondering why mine isn't doing what I had hoped. Fortunately I rarely have those two characters together, so I don't care enough to dig further as it's just me.

Thanks for the response! :)

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

No branches or pull requests

6 participants