I downloaded & installed Visual Studios 2022. After creating a new project, and playing with the IDE for some time, I noticed that my font size was set to bold everywhere in the editor. Keywords, operators, punctuation, strings, variables, functions, classes, everything! Obviously I tried to change the size of the font, but it always reverts back to being bold.
Did I do something to cause this? How can I change it to not use bold font everywhere?
This is due to Microsoft changing the default font in Visual Studio 2022 from Consolas to Cascadia Code: a font which is designed to make text easier to read for people with disabilities like Character Dysmorphia or Dyslexia. You can change this back to "Consolas", the VS 2019 font by going to
Tools > Options > Environment > Fonts and Colors > "Show settings for: Text Edit" > Font: "Consolas"
SO THERE ARE A COUPLE OF ISSUES THAT CAUSE THE FONT TO RENDER OVERLY BOLD
I know that this answer isn't as popular as the other answer, but there was more to this problem than just changing the font. Originally, I tried changing the font, and it didn't work. It turned out, I had somehow turned on an option called "Windows High Contrast" which renders the font as an "ANSI Standardized Terminal Emulators" where there is an option of font that is not only more saturated & brighter, but bolder as well. Only then did changing the font back to the Original Microsoft Consoles font provide the experience I had expected.
Even Here the Story Doesn't End
I later found out about a feature called Power-lines, which is a really awesome looking feature, and provides a great command-line experience. And Cascadia Code supports Power-lines, Consoles does not.
Also I have to read code in a foreign language occasionally, and Slavic/Asian Languages render very nicely in Cascadia Code. So after over 6 months of grappling with fonts. I found that Cascadia Code actually has a variable font-weight, such that 300 and 400 are valid weights, but so 350, or 565 (too bold).
So for me, what worked, was to change Cascadia Codes weight to 350. Its actually kind of cool to be able to pick a font's boldness using a dynamic weight, rather than being restricted to increments of 100.
Tools
Options
Environment
Fonts and Colors
Text Edit
Font Weight: 350
Image Showing Windows Terminal w/ Power Lines Support
Related
The update for Visual Studio 17.4 has changed the font in the text editor, so that it is very thin and a bit of a strain on the eyes to the read. How can you change this back, short of rolling back the update?
Please note that I've searched a little bit for this, and I see the following setting:
But I have no idea what to set this to. People have mentioned the Consolas font on one or more other posts, but that doesn't seem to match what was there before. I've tried checking Bold. Etc.
I just need it back to the "normal Visual Studio font" that was there before the update to 17.4, which has enough thickness in the letters that it's not uncomfortable to read.
Happened to me too, and let me say that the "new" font is pretty ugly compared to the original one that was Cascadia Mono SemiBold. Also uncheck bold if was checked and the size should be to 10.
(Sadly, in my case, it is no more present in the fonts list. Maybe this is the reason why it was set back to default. But Cascadia Code SemiBold should be 99,9% similar)
In this case, you can download Cascadia Mono Releases and install it again (?) in your system.
I also had issues with the font, installing other fonts didn't help. I installed the Text Sharp addon and enabled ClearType rendering which seemed to fix the font trouble I was having.
Edit: After more investigation, Visual studio has settings for text rendering thus disabling the addon and setting the Text rendering method to ClearType gives me back the original font:
And it seems like changing the Text Formatting method to Display instead of Ideal gives me the original issue I had.
And I also had to download Cascadia Mono to get the Cascadia Code font but without the ligatures (i.e. not changing != to an = with a line through it)
Apparently there was a bug in the installer that incorrecly uninstalled the fonts during update (17.4.4 release notes)
"Addressed an issue when Cascadia Code and Cascadia Mono font gets
uninstalled during Visual Studio update process."
It is said to be fixed in 17.4.4
with the note that updating from previous version to 17.4.4 may experience the issue, but that it will not happen with future updates (e.g. 17.4.4 -> 17.4.5.)
The settings path is Tools / Options / Environment / Fonts and Colors /Enrivonment/ Font. I'm talking about the Environment that I emphasized in bold in the settings path.
Notice how it doesn't tell you what the default font is; it just says Automatic. And the font size is disabled until you pick a specific font.
If I want to change the font size, it makes me pick the font first. But I have no reason to change the font, just the font size. Soo, what's the default Environment font?
It's probably the same as in Visual Studio 2015, which also hides it.
It turned out to be Leelawadee UI for Windows 10 Professional.
For other OS versions, you can put the focus on the font dropdown, and up and down arrow, or press the first letter of the font, or press Home to go back to Automatic (the first dropdown option). Thereby, you can keep your eye on the Sample window to determine the default font. If you get on a font, then hit the Home key, and the Sample doesn't change (even a little bit), that's your default font. Please leave a comment if you find one!
I recently installed Visual Studio 2013 Ultimate.
Now, as you know, there is this "n references" above all methods.
When I go to the CodeLens options, I can't disable this single feature, since the checkbox is grayed out.
So how can I disable it?
Only workaround I found was un-checking the "enable codelens" option.
The References indicator is required to be on because it is the only one that knows how to do "placeholder" items (the one that says "- references"), and is guaranteed to show up everywhere that codelens appears.
If you could turn off references, then it is highly possible that codelens would reserve space for indicators, and yet no indicators would ever appear, so you would end up with blank lines on every method/class/property that aren't real blank lines, they're just reserved space for codesense elements that will never appear.
I'd suggest using the "send a frown" thing in visual studio and commenting about this if you want to turn just references off.
If you want to keep the CodeLens functionality but mostly get rid of the references, go to:
Options/Environment/Fonts and Colors
Show settings for: CodeLens
and change the settings to:
Font: Consolas
Font Size: 6
Indicator Text: White
Indicator Text (Disabled): White
Indicator Separator: White
Choosing Consolas reduces the line height beyond the default Calibri font, even at font size 6. There might even be a smaller font that you can use but I haven't found it.
If you have a dark background choose a matching dark color instead of White where it is mentioned in the steps above, since the goal is to hide the CodeLense text.
In Visual Studio 2015.
Tools > Options.
Text Editor > All Languages > CodeLens.
Uncheck “Enable CodeLens”
How can I disable the font smoothing in the text editor of Visual Studio? On some machines I use, this works, but, not in most of them.
The text in the editor on the left is not really sharp. But the font in Windows is.
There is an extension called Text Sharp that allows you to completely disable font smoothing (ClearType) for Visual Studio:
https://visualstudiogallery.msdn.microsoft.com/7aafa2ea-8c54-4da8-922e-d26bf018514d
I'm using this combined with the Source Code Pro font for very readable code.
Well, the characters are at least readable. The code itself may be a different story. :)
In Visual Studio 2019 v16.5.4 (possibly lower), there is a new feature under the Text Editor -> Advanced settings called "Text rendering method". This appears to be defaulted to "ClearType" upon installation. On my machine, I've disabled ClearType at the OS level, yet after a fresh install/update, noticed that my fonts were being smoothed.
Simply switch this setting to "Aliased" to get pixel-perfect font rendering back.
Again, this assumes you have already disabled ClearType at the system level. I am unsure if VS settings would ignore/override the system-level ClearType settings or not.
In my case the problem was that I had the text size to 120%, I just change it to 100%.
Is an option located in Display Settings above the Resolution selector. It says:
"Change the size of the text, apps, and other items"
set the value to:
100% (Recommended)
This happened to me when I added a new LCD monitor to my setup.
According to blogs.msdn.com and this post on SuperUser, you may have to disable it in many places, but for VStudio two are enough:
Control Panel > Display > Adjust ClearType Text
Control Panel > System > Adjust the appearance and performance of Windows > Visual Effects > Smooth edges of screen fonts
Don't use Consolas as it always uses ClearType, as Alex K. noted in the comments.
Prefer Lucida Console which is a fixed font (they are bold in VStudio's font list in Tools > Options > Environment > Fonts and Colors) and appears not to suffer from the effects of ClearType or smoothed edges.
For those willing to disable anti-aliasing/smooth edges/cleartype on VS Code as of today, there's no official option inside the VS Code program to do it. Instead, I have found this method that works for me, and it's thanks to this article: https://medium.com/kasun-kodagoda/fix-text-becomes-blurry-when-vs-code-application-loses-focus-issue-on-windows-d95697b2f927
Here are the steps:
<img src="https://i.stack.imgur.com/L2i9S.png" alt="..." />
Disable anti-aliasing VSCode Image:
Right click on VS Code program and go to Proprieties.
In the "target" section of the app, add the following lines: --disable-gpu --enable-use-zoom-for-dsf
Apply the changes and that's it.
I hope it's useful.
For me it helped to switch to "Consolas" font and then back to "Courier New" in Tools->Options->Environment->Fonts and Colors. Don't forget to press "OK" after switching to Consolas.
I know how to set the font in Options -> Fonts and Colors. It would be nice to be able to have font settings per solution so that 1 solution could be set to Monaco and another one set to Consolas for example.
Why? Sometimes when you have several solutions open, particularly when you have dragged code windows onto multiple screens, it would be a nice tip-off to instantly see which project you are editing by seeing the different font.
Here's a question/answer on SO which might be the solution for you.