56

Recently I installed vs 2022 to test .net 6 and after installing it, I found the default font in vs 2022 is like a bolder font(seems to be Cascadia), it's not fits me well so I changed it in vs 2022 pre->tools->options->fonts and colors to change it to Consolas which is the same in vs 2019. Then vs 2022 seemed ok, but I found in stackover flow, text font in textarea also changed to this kind of "bolder font",

I've ruled out the issue from chrome, as it's the same in Edge. But input box doesn't be influenced.

Details in screenshot here, the font of the words in textarea and those formated in code has changed.

Can anyone do me a favor? Thanks in advance :)

enter image description here

wanttoh
  • 637
  • 1
  • 5
  • 9
  • 1
    There was a lot of recent changes around fonts and text on Stackovetflows site. I have a feeling that your issue is not related to Visual Studio at all. – Timothy G. Sep 18 '21 at 00:47
  • @TimothyG. Yeah, I also think so, but for me, the beginning is installing vs2022, maybe it's more likely that the net 6 sdk leads to the issue by installing some other fonts files to my operation system. – wanttoh Sep 22 '21 at 01:55
  • "What if we opened the gates of hell and let forth a monospace Comic Sans? And then sneakily forced our transgression against God upon our innocent customers?" -Microsoft, probably – MarredCheese Nov 11 '21 at 16:29
  • @TimothyG. I am seeing the same font in Stackoverflow code boxes as well. I have changed the VS font but the change isn't reflected on Stackoverflow. Any help? – Junaid Jan 23 '22 at 16:50

4 Answers4

96

I noticed the changed font right away, too. I changed from Consolas Mono back to the older Consolas.

Tools (menu) -> Options
  Environment (category) -> Fonts and Colors
    Show Settings for: Text Editor
    Font:  Consolas

Tools.Options.Environment.FontsandColors

Cryptc
  • 2,959
  • 1
  • 18
  • 18
  • 3
    That changes VS itself. But how did you get it to propagate to StackOverflow? – MarredCheese Nov 11 '21 at 16:34
  • 13
    Finally, I can read my sourcecode again. If only Microsoft would ASK their users IF they want the new stuff or add it as a skin you can choose from and not force it down your throat everytime you get a new version. – BerggreenDK Dec 25 '21 at 17:41
  • 7
    You're my savior. That font in VS2022 almost made me incapable of coding. What an awful thing todo: not take the font used in VS2019 but just some other font. – Mike de Klerk Jan 12 '22 at 15:27
  • 4
    That new font is an uggo. Thank you for curing my temporary insanity. – System.Cats.Lol Jan 12 '22 at 20:11
  • How do you make it persist though? Restart visual studio and its back to Cascadia – CarComp Jan 21 '22 at 20:00
7

The font used by Stackoverflow is only very loosely connected to the font used by Visual Studio 2022 - in that if you have never installed the Cascadia font family prior to installing Visual Studio, it will then be installed.

At the time of writing, Stackoverflow's code editor uses the following CSS declaration:

--ff-mono: ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;

The ui-monospace font is a future standardised way of selecting the system monospace font, but is currently only supported by Safari. Therefore, as soon as you install the Cascadia font package (from whatever source - it's included now in various Microsoft products), Stackoverflow will switch to using that as the second highest priority font listed.

As to how to stop it happening - your only option is to uninstall the Cascadia Mono font, or to pester the design people at Stackoverflow to get them to remove it as an option from their CSS.

dosxuk
  • 73
  • 1
  • 3
5

I'm not sure if it's the best solution but it's the only method with luck, just uninstall the font in win 10 system.

Go to settings-> choose font setting-> find and click into Cascadia and Cascadia mono-> click uninstall , then it returned to normal for me.

When I uninstalled Cascadia mono it appeared a pop-up and told me it's in use, so I closed my chrome and continued the uninstall action.

Done here.

wanttoh
  • 637
  • 1
  • 5
  • 9
2

Same thing happened to me but when I went into fonts, it was already Consolas. I changed it to something else and then changed it back to Consolas which fixed it. It was odd.

To do that, from the top menu, click on Tools -> Options -> Environment -> Fonts and Colors

Taylan
  • 39
  • 3