I'm trying to make VS Code editor to look exactly like Visual Studio. I made sure the font settings are exactly the same, however text still renders differently in VS Code (it seems "lighter").
Is there any way to fix this issue?
In the image below the top text is copied from Visual Studio while the bottom one is copied from VS code.
I know the difference is subtle but is still pretty noticeable.
Font rendering in VSCode has been a reoccurring issue throughout a good portion of the editors life time. Font rendering, especially in portable GUI's, is affected by several different layers, for example:
Your Graphics Card can affect the way font is rendered (you can try adjusting the graphic cards settings manually).
Your Monitor, obviously, affects rendering. In fact your monitor has a huge impact. (Try playing with your Monitor's Settings)
The color settings that are offered by your OS may have an impact (often times the color settings are the same as the graphic card settings though. Which means you can just use your OS's GUI to adjust your cards settings in some cases (Not on Ubuntu though))_
Somethings are out of your control, like:
VSCode, it is written using Electron v6. Not only does Electron impact font rendering, but when VSCode switched it Version 6 a lot of people reported a decrease in the editors font rendering quality.
VSCode also implements Anti-Aliasing tools, but as far as I can tell, they auto configure, so you have no control over this. These tools are likely to be one of the biggest causes to the difference in rendering you see, between VS IDE & VS CODE. There is a tool however that may give you some control over the Visual Studio side of rendering that I share a link to below. And just as an FYI, the Anti-Aliasing that VSCode uses is called Sub-pixel Rendering, which is something that Visual Studio doesn't implement as far as I can tell.
The Area You Have the Most Control in:
There is ONE tool/thing that you have 100% control over, that also greatly affects font-rendering, and that is the font that you decide to use. When choosing a font, you have the choice of equipping an OTF, or a TTF. In my personal experience, OTF's render better 90% of the time. The difference is in how they are created.
TTF fonts are made using quadratic Beziers.
OTF fonts are made using cubic Beziers.
Links above are the same
Fonts use something called font-hinting
Font hinting. Essentially font-hinting is a list of instructions that dynamically changes the way a font is rendered, by using the rasterized grid background as a parameter. adjust the display of an outline font so that it lines up with a rasterized grid. Choosing a quality font equipped with good hinting is critical for non-blurry readable text.
Many people choose font because like the way they look, or the italic version of the font they use is popular. When choosing a font, it is extremely important to choose, not the coolest one, but the one that renders with the highest quality, and is the easiest for you to read.
Well Rendering Fonts:
Not only are their fonts that render well, with ligature support, but the best rendering fonts are always free IMO. Bellow are Fonts that use font hinting and have top notch rendering abilities.
JetBrains Mono (JetBrain's Font & My Personal Favorite)
Cascadia Code (Microsoft's Programming Font from 2019)
Fira Code (Not that old, but not that new either. Is loved by many.)
Fira Mono (No Ligatures, Different Font than Fira Code)
Consolas (A classic)
Menlo (Another Classic)
The top 4 are at the top of the list because they receive updates ever few months. I don't think Menlo & Consolas receive regular updates, but they aren't left forgotten either, the are updated every year or two.
To finish with as solid of an answer as I can provide:
_"Getting VSCode to render like the Visual Studio IDE, is not something that you will probably get, with 100% satisfaction, getting an exact match with all of the different factors is just an extremely and possibly impossible thing to due. You can probably make the way the two pieces of software render, more a like, not in functionality, but in looks. It would probably help a great deal to make sure that everything that affects rendering is up to date, editor, IDE, fonts, tools, ect... From their you can try different versions, and see if maybe an older version of VSCode rendered in a way that is preferable to you. You should also play with your monitors settings. I have found that I can accomplish a great deal just through the buttons under the face of my monitor. Check Visual Studio for any rendering settings it might have, VSCode doesn't have much available, but maybe Visual Studio IDE does (I haven't used the IDE in 5 years so IDK if it does).
On a final note:
Their is one tool that could help you, I haven't used it, because it isn't for VSCode, it's for Visual Studio, but it might give you more control than you have now. The tool is called..."_
Text Sharp (Click Here to see it in the VS Market Place)
Related
I recently migrated from visual studio code to visual studio (because vsc and unity wouldn't be friends), and my only gripe is minor, yet a major annoyance: Despite all other text looking fine and crisp, collapsed region headers are so blurry they border on unreadable on my small screen (See image).
I can't find any applicable settings or previous threads. I'm working from a mac, have yet to add any extensions, and use only default settings (except for dark mode ofc). Any ideas for causes or solutions would be greatly appreciated :)
Edit:
Am I just looking in the wrong place for my settings? Is Apple hiding stuff from me again?:
I find everything to be a bit too small for my liking whenever I'm working on my 1080p, 14" laptop and have been trying to find a way to scale up EVERYTHING (text, icons, etc), but somehow the only thing I can find is scaling up the font in the editor or other windows, one by one, inside of Tools->Options->Fonts and Colors.
This has to be possible, right? What you get when hitting [ctrl +]/[ctrl -] in VS Code is essentialy what I'm trying to achieve, except in VSC2019.
Whenever I scale the code editor in Visual Studio 2015 it makes the font blurry instead of properly scaling it. I'm using the default font (Consolas). Changing the font size in the settings works, however, that's not a solution for me as I tend to change the font frequently based on how much code I need to see at once (for some reason I generally prefer bigger font).
I have not used VS for about a month, and so I may have installed something that messed it up or something.
Here's what I'm talking about:
100% scale (fine)
200% scale (blurry)
I've learn how to manage different DPI settings the hard way, so that at runtime my applications are properly displayed.
But there is still a big issue with Design time Visual Studio.
Say I build an application at 96 dpi and I switch my display to 120 dpi for testing purposes.
Now IF I open a form designer at 120 dpi, the form is resized according to 125%, the controls moved aso! :-(((
So I try to avoid reopening forms, but that's NOT a nice solution, isn't it?
Is there by any chance a design time setting to prevent form to resize?
Not a solution but possibly a workaround: do not test on your computer but on a VM or other computer and do not open the solution on a computer with big fonts.
And we found that we cannot use the AutoScaleMode = Dpi.Font setting. That will randomly resize forms when we open them in the designer. Dpi or None seem to work.
Although this question is already old, I want to share my workaround.
Keep the Form’s AutoScaleMode = Font. This works fine, if you control the rest correctly.
Set in your Forms Designer: Font = MS Sans; 11px. Basically, specify your Fonts in Pixel, instead of Points. So Visual Studio won't re-scale anything if the system's DPI change.
In the Forms Ctor, after InitializeComponent, re-set: Font = SystemFonts.DefaultFont. Now, at run time, Fonts will use Point-based sizes again, and you get nice high-DPI GUI.
Enable DPI-Awareness, either through a manifest or by API function SetProcessDPIAwareness
You can find the details of my (hard) learning trail on my Blog: http://www.sgrottel.de/?p=1581&lang=en
Like many SO people, I'm in front of a computer almost all day. I like having a dark theme for Visual Studio (easier on the eyes), but since the rest of Windows and apps (explorer, dialogs, Outlook), have the full white background, it's even harder to switch between nice dark VS and sunshine bright Windows.
I tried a UXTheme.dll patch but couldn't find any dark themes that worked across Visual Studio and Windows apps in general. Any suggestions?
Edit: To be clear, I'd like no or almost no white. No scrollbars, menus, etc.
I don't think you're going to find a Windows theme that can accomplish your task. Many software applications do not adhere to colors specified in Windows preferences and are not at all customizable--Notepad, for example, is black text on a white background, end of story.
For themes in general, Microsoft has released two official XP themes within the last year that may be worth looking at:
Zune
Embedded
If you are planning on using a modified uxtheme.dll file, you can check out Luna Element Black, which is one I have used for well over a year now.
If you are this passionate about not having white areas visible in some of the programs you use, perhaps you need to find new applications that provide similar features but also offer customization in terms of fonts and colors--for example, using Notepad++ instead of Notepad, which gives you an almost exhaustive amount of customization possibilities.
May be not exactly what you are looking for, but this is a dark color scheme for visual Studio (2005 or 2008) you may use in complement of UXTheme.
Off course, they are other dar color schemes for Visual studio, like this one (Jeff has one also).
But I am not sure there is one tool that applies to all windows, including Visual Studio.