The official source of product insight from the Visual Studio Engineering Team
Text clarity in Visual Studio 2010 has been a hot topic throughout the product cycle. Each time we talk or write about it, we seem to invite yet another round comments, some of them quite emotionally charged. We take such feedback very seriously because, whether the comments are completely justified or not, there’s always some nugget of customer discontent at the heart of it. So, risking the same result here, I want to tackle the topic one more (last?) time.
Following Brittany’s post earlier in the week regarding improvements we’ve made to ClearType text clarity in time for Visual Studio 2010 and .Net 4 RTM, several people indicated in the comments that they would rather not use ClearType at all. I was going to reply in the comment stream, but a full response needs some pictures and more space than the comments would allow.
To address Brian Henry’s comment directly, Visual Studio 2010 uses WPF 4’s TextRenderingMode.Auto setting; or rather - it doesn’t change the default. This means that, if you turn off ClearType for your desktop, then Visual Studio 2010’s text will respect that choice. ClearType is designed for LCD screens and other flat panels which arrange their pixels in vertical stripes of red, green and blue. It’s not ideal for CRTs or for displays with different pixel geometry, for example a rotating flat-panel display that is turned to portrait mode. Apart from that, some people (perhaps between 5% and 45%) simply prefer non-ClearType rendering, even if their display supports it.
On Windows XP and Windows Vista, ClearType may be turned off by first going to the Display Properties settings from the Control Panel. Select “Appearance” and click “Effects…” and uncheck the box that says “Use the following method to smooth edges of screen fonts:”.
Note that there are three settings: No font smoothing (unchecked), Standard font smoothing and ClearType. Click OK when you have made the selection and then Close the Display Properties dialog to apply the new setting.
In Windows 7, you can turn off ClearType using the built-in ClearType Tuner. Type “ClearType” into the Windows search box and select “Adjust ClearType text”:
On the first screen, uncheck the box that says “Turn on ClearType”
Run through the rest of the ClearType Text Tuner Wizard and now Visual Studio 2010, and other applications, will use standard anti-aliasing instead of ClearType for text rendering. To turn off font smoothing entirely, you need to dig a little deeper. Type “Appearance” in the start menu and select “Adjust the appearance and performance of Windows”:
On the “Visual Effects” tab of the “Performance Options” dialog, scroll down to “Smooth the edges of screen fonts”, uncheck it and click “OK”.
You shouldn’t need to restart Visual Studio 2010 for this to take effect. This works in the Visual Studio 2010 Release Candidate too; you don’t have to wait for RTM to see it. The following screenshots are from Visual Studio 2010 RC.
(Hint: If you’re using Windows 7, and you want to see a zoomed-in view, don’t “zoom” your browser because that results in a bilinear stretch. Instead, use the built-in magnifier tool. Type “Zoom” in the Windows search box or, for a keyboard shortuct, hold the Windows key and press the plus key.)
If you’re writing your own WPF 4 application, make sure you are using “Display” mode for text (instead of the default, “Ideal”). In Display mode, WPF will follow the user’s choice of ClearType on or off. The choice may be overridden by using other values from the TextRenderingMode enumeration (ClearType, Grayscale or Aliased).
Even if you turn off font smoothing entirely, the Consolas font will be rendered using ClearType in Visual Studio 2010. This is an intentional decision for Visual Studio 2010 and applies only to Consolas. Consolas, the default font for the Text Editor in Visual Studio 2010, is part of the ClearType Font Collection and was designed specifically for use with ClearType.
You may, of course, select a different font for the Text Editor by using the “Fonts and Colors” dialog in Visual Studio’s Options. Anything other than Consolas will respect the system’s font smoothing options.
If you want to continue to use Consolas, but without ClearType, then you may be interested in the “TextSharp” extension by Sergey Vlasov. TextSharp has the option to set the text rendering mode to “Aliased” for all text editor views.
One commenter indicated that he prefers to replace the default “Segoe UI” font for menus and toolbars with “Microsoft Sans Serif”. Here’s how to do that.
And here’s what Microsoft Sans Serif looks like on Windows 7 with ClearType turned off:
Note: Microsoft Sans Serif does not have anti-aliased hinting, so it looks the same whether “Smooth edges of screen fonts” is on or off.
For the Text Editor, instead of Consolas, try 9 point “Lucida Console”. Again, use the Fonts and Colors dialog, but this time choose “Text Editor” from the top dropdown.
Paul Harrington – Principal Developer, Visual Studio Platform Team Biography: Paul has worked on every version of Visual Studio .Net to date. Prior to joining the Visual Studio team in 2000, Paul spent six years working on mapping and trip planning software for what is today known as Bing Maps. For Visual Studio 2010, Paul designed and helped write the code that enabled the Visual Studio Shell team to move from a native, Windows 32-based implementation to a modern, fully managed presentation layer based on the Windows Presentation Foundation (WPF). Paul holds a master’s degree from the University of Cambridge, England and lives with his wife and two cats in Seattle, Washington.
Ah...thank you for the explanation !
I think you made a bad decision about Consolas:
"Even if you turn off font smoothing entirely, the Consolas font will be rendered using ClearType in Visual Studio 2010."
This leads a lot of people (including me) to assume that VS doesn't respect your cleartype-setting. I understand (now that you explain it) that Consolas was created for cleartype, and that it doesn't work without it, but you should rather change the default font when global cleartype is turned off instead of "forcing" cleartype and consolas.
A simple message box explaining this the first time you restart VS after changing cleartype-settings would probably be enough. Well, at least those who read this blog will know this now :-).
One small note: The Windows 7 magnify tool on my PC also does bilinear sizing, and it looks _really_ bad. This makes it unusable for development work (control layout etc).
Luckily the Windows XP magnify tool works fine under Win 7!
Thanks for the comments.
@Atle Iversen, I agree that forcing Consolas to ClearType rendering has led to confusion. Somewhat ironically, that decision was driven by beta user feedback. On many remote desktop sessions, font smoothing is disabled (to reduce network bandwidth and improve performance) and this led customers to report that their editor text looked 'blocky' or 'pixelated' (i.e. aliased). The default value of the font smoothing setting depends on the combination of the remote OS and the version of the Remote Desktop Client (mstsc.exe). The default may be changed manually in the client options "Experience" tab, but users were not discovering that option. This is one of the occasions where we had to walk a fine line between disappointing one group of customers in order to satisfy another group. It's debatable whether adding an option to Visual Studio would have helped since users were already not finding the option in the Remote Desktop Client.
Separately, I've heard (although I've not been able to confirm this) that some glyphs from east Asian scripts are completely unreadable using the Consolas font. ClearType hinting was required to display those characters correctly.
@Paul*, it actually depends on your Windows 7 desktop theme. In Aero themes you get full-screen magnification. Sorry for not making that clear in the text.
This is really nice, thanks :)
In Windows 7, the cleartype tuner lets you tune each monitor separately (very useful if one is rotated for instance). I haven't been able to find out if those settings actually get used by anything at all though (or how it would cope with a window half on each). Do you know if WPF 4 (and therefore VS 2010) respect these per monitor settings?
I have having font problems with VS10 RC1
I running Windows 7 on a 1920 x 1200 screen
and the font is very pixalated so much so that it is unusable
VS08 is fine
Changing the font makes no difference
Switching off Cleartype in W7 makes not difference
Switch off Font Smoothing makes no difference
although when I do this this VS08 looks as bad as Vs10
Any ideas what else I can test
@David: Thanks for posting! I'm finding out now and will let you know as soon as I have an answer.
@Mike Lockyer: Could you post a link to a screenshot so we can take a closer look? This type of issue is difficult to diagnose without being able to actually see the problem in action.
Is there a way to turn off font smoothing JUST for Visual Studio? I use programmer fonts such as MonteCarlo and Proggy, which are raster fonts that have been converted to TTF format (because VS2010 is now incapable of rendering raster fonts). The font smoothing completely ruins these programmer fonts. But of course I don't want to turn of font smoothing entirely for the OS, since it's useful for most other TTF fonts.
You understand that programmers spend something like 90% of their day looking at text files with a specific font, right? Of course people are emotional about that. :-)
@Pete: There unfortunately isn't a way to turn off font smoothing for Visual Studio alone. We do understand the frustration for programmers with raster fonts, though. It's too soon to know whether or when either of these might be implemented, but both 1.) VS-specific font options, including font smoothing options and 2.) WPF support for raster fonts are on our backlog of ideas to discuss for future releases.
Thanks for posting,
Thanks, Brittany. Out of curiosity, does Microsoft prioritize fixes based on customer feedback? Is there some way for customers to vote on their most hated bugs to increase the priority? :-)
My impression is that 50% of people can't tell the difference with ClearType, and maybe 40% think it looks better. But the remaining 10% of people absolutely loathe it. (If you question these percentages, try a few Google searches for "ClearType sucks" or "hate ClearType".) It's difficult to understand Microsoft's attitude towards this unfortunate 10% minority.
But what's really perplexing is the fact that WPF completely revolutionizes graphics rendering, leverages cutting edge video card hardware, effortlessly juggles alpha blending and complex vector paths -- but somehow it's completely unable to copy a few pixels onto the screen at precise locations? I mean, raster fonts are trivially easy to render. I had assumed that this feature was planned but cut to meet a deadline... but you appear to be saying "it's too soon to know whether" raster fonts will ever be supported in WPF. If so, wow.
@Pete, Thank you for your comments.
You can use the Text Sharp extension to control aliasing in the Visual Studio text editor independently of other applications. visualstudiogallery.msdn.microsoft.com/.../7aafa2ea-8c54-4da8-922e-d26bf018514d
Yes, we absolutely do consider customer feedback and "up-votes" when deciding which bugs to fix or features to implement. It's not the only prioritization mechanism, of course, but it's probably the most important. Please use the Microsoft Connect website to submit feedback: http://connect.microsoft.com
Also, with respect, Pete, I would never dare to diminish the work of the WPF text team. Having spent some time with them during WPF 4 development, what they do is pretty heroic. There is nothing about font rendering that is ever "trivially easy" - raster fonts or otherwise.
TextSharp solved my problem! Thanks, I really appreciate Microsoft's openness and interest in feedback, it made a difference in my VS2010 experience. :-)
What a coincidence, the cleartype on/off samples conveniently are the same URL. Not much better than when the E7 blog pretended classic AA didn't exist.
@blah: Thanks for catching that. Being rich in images, this article experienced some 'trauma' during the upgrade to the new MSDN blog platform and that's probably where this error crept in. I'll try and get this fixed in the next day or two.
There, I fixed it.