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

How to disable character auto convert (ligatures)? #12213

Closed
gitsang opened this issue Jan 21, 2022 · 13 comments
Closed

How to disable character auto convert (ligatures)? #12213

gitsang opened this issue Jan 21, 2022 · 13 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@gitsang
Copy link

gitsang commented Jan 21, 2022

Version: Windows Terminal Preview 1.12.3472.0

For example, if I type != it will be auto convert to . I don't want this. How can is disable it?

image

@gitsang gitsang added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jan 21, 2022
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jan 21, 2022
@237dmitry
Copy link

Disable ligatures in font features. Or choose font without ligatures. As a rule, the name of the font contains the word Mono.

@zadjii-msft
Copy link
Member

Yea, those are called ligatures. You can change the font from "Cascadia Code" to "Cascadia Mono" as an easy solution. Otherwise yes, the font features is another way to disable them. See: https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-11-release/#font-features-and-axes

/dup #759

@ghost
Copy link

ghost commented Jan 21, 2022

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jan 21, 2022
@gitsang
Copy link
Author

gitsang commented Jan 24, 2022

https://docs.microsoft.com/zh-cn/typography/opentype/spec/featurelist

"font": {
    "face": "Iosevka",
    "size": 11,
    "features": {
        "calt": 0
    }
},

diable calt can solve this

@gitsang gitsang changed the title How to disable character auto convert? How to disable character auto convert (ligatures)? Jan 24, 2022
@lukebakken
Copy link

@gitsang FINALLY I found the correct way to disable ligatures. Everything else I read suggests "liga": 0 will do it but it does not. "calt": 0 disables them. Thank you!

@dufuhang
Copy link

@gitsang It's very useful! THANK YOU!

@Tumb1eweed
Copy link

https://docs.microsoft.com/zh-cn/typography/opentype/spec/featurelist

"font": {
    "face": "Iosevka",
    "size": 11,
    "features": {
        "calt": 0
    }
},

diable calt can solve this

very useful!

@ClaireCJS
Copy link

I only want to disable one specific ligature: ***

Any hints on that, anyone who happened to have read this far?

@DHowett
Copy link
Member

DHowett commented Sep 27, 2024

Unless the font allows you to customize individual glyphs (with specific OpenType features,) it's not going to be possible to turn off just one ligature. Sorry!

@ClaireCJS
Copy link

Unless the font allows you to customize individual glyphs (with specific OpenType features,) it's not going to be possible to turn off just one ligature. Sorry!

Hmm, okay...
Is there some easy tool i can use to edit the font, remove that 1 ligature, and use that in WT instead?

Heck, if i'm at that level i might want to add or modify even more than that one, just for fun.

@o-sdn-o
Copy link

o-sdn-o commented Sep 29, 2024

Is there some easy tool i can use to edit the font

You could try FontForge.

  1. Run FontForge
  2. Open ttf-file: File->Open->Ok
  3. Element->Font Info...->Lookups->GSUB-> delete what you want (look single substitution lookups, double click + mouse hover tooltips will help you to find you want)
    image
  4. Change Element->Font Info...->PS Names to avoid interference with original ttf
  5. File->Generate Fonts... to save modified .ttf file
  6. Locate modified ttf-file using desktop explorer and click to install it.
  7. Restart WindowsTerminal and select modified font.

@ClaireCJS
Copy link

ClaireCJS commented Sep 29, 2024

Holy cow. I never dreamed of having that much control over console. This sounds like a good product for temporary hyperfocus.

For instance, I think the commas after the right brackets in a situation like this:

[1, 2, 3], [4, 5, 6], []

should be tucked a little closer (1px left, and 1px down) to the right-bracket than they are.

I'll try it out, thank you so much for the guide!

@ClaireCJS
Copy link

I think in the end, I've decided to just clone the font from your github, and simply remove the raising of the asterisk:

image

Tempted to delete the whole file, but the angel of unintended consequences says "change as little as possible".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

9 participants