20

In Visual Studio 2022, some operators like == and => are shown in a special way:

enter image description here

I'd rather turn that off but I haven't found a way to do it.

Dariusz Woźniak
  • 9,640
  • 6
  • 60
  • 73
StefanFFM
  • 1,526
  • 1
  • 14
  • 25
  • 2
    Search the settings for "ligature", as that's what those are. (Disclaimer: I have no VS 2022 installation to test with.) – Jeroen Mostert Nov 18 '21 at 11:24
  • 4
    Visual studio doesn't allow to turn on/off ligatures, instead you have to change font under `tools -> options -> environment -> fonts and colors` – JL0PD Nov 18 '21 at 11:27
  • I'm pretty sure this isn't on by default, and ligatures are normally a property of the font you're using. Have you chosen to use a fancy "programmer" font? – canton7 Nov 18 '21 at 11:27
  • 2
    @canton7, VS2022 uses Cascadia code by default: https://devblogs.microsoft.com/visualstudio/weve-upgraded-the-ui-in-visual-studio-2022/#more-accessibility-and-flexibility-in-editor-fonts – JL0PD Nov 18 '21 at 11:29
  • 1
    @JL0PD So it does, and it has ligatures enabled. What fun. OP, you can just change the font to something sensible, like the old-school Consolas – canton7 Nov 18 '21 at 11:33
  • Just change font back to consolas. `Tools->Options->Fonts And Colors`. The ligatures are in the font, not as a setting – Firewizz Nov 18 '21 at 11:33

2 Answers2

23

You can change from Cascadia Code to Cascadia Mono. This font doesn't support ligatures

Aarnihauta
  • 441
  • 3
  • 10
8

As people in the comments have pointed out, the only way to get rid of the ligatures is to select a font that does not have it, like Consolas.

StefanFFM
  • 1,526
  • 1
  • 14
  • 25
  • 4
    Or, if the linked article in the comments is correct, Cascadia Mono, which is the same as Cascadia Code but without ligatures, and should also be installed by default. I personally prefer Fira Code, another font with ligatures, which has a non-ligature equivalent in Fira Mono. Of course good old Consolas remains an option as well. – Jeroen Mostert Nov 18 '21 at 13:01