Current version

v1.10.4 (stable)


Main page
Archived news
Plugin SDK
Knowledge base
Contact info
Other projects


Blog Archive

WPF text hinting (or lack thereof)

One of the problems with Windows Presentation Foundation (WPF) has been its lack of text hinting. Text hinting adjusts the position of glyph curves to better match the grid, resulting in better legibility because stems appear sharper than if they were positioned between pixels. WPF omitted text hinting in order to attain resolution independence, but this resulted in illegible text at small point sizes, such as that commonly used in UIs. If you've ever taken text and resized it in an image editor, you're seeing a similar problem.

Visual Studio 2010 is switching to WPF for its text editor and parts of its UI, which led to some concerns about text readability. Some work has been done with WPF 4.0 to add back in hinting support, which I can say seems to have worked in beta 1:

These screenshots were taken with the default Consolas font and with the Lucida Console 10pt font I use with VS2005, on Windows 7 RC. It looks fine. I suspected that maybe VS2010 was still using WinForms, but I verified that there's no WinForms container window in Spy++, and you can also tell by the caret, which curiously changes width slightly as it moves. I wouldn't have thought that the caret would require hinting as well, but I can say now that it definitely looks weird having the caret antialiased. I also have to say that, unlike the old Courier New default that I hated passionately, the new Consolas default looks pretty good. It takes more space vertically than Lucida Console, but it takes less space horizontally and looks sharper. I personally like ClearType, though; those who don't are a bit stuck, as I don't believe you can turn it off in VS2010.

Unfortunately, while the text editor looks good, the menus are a different story:

Ewwww. Apparently I'm not the only one to notice this, based on the forums. I don't think I could stand it if the text editor looked like that. Text hinting is good.

Side note: I wanted to post whether VirtualDub compiled with VS2010 out of the box, but I can't figure out how to integrate the DirectX SDK. The VC++ Directories option seems to have gone missing with the switch to MSBuild, and I can only find it as a project setting now. The last thing I want is to bake a system-specific path into a project file. Hmmm.


This blog was originally open for comments when this entry was first posted, but was later closed and then removed due to spam and after a migration away from the original blog software. Unfortunately, it would have been a lot of work to reformat the comments to republish them. The author thanks everyone who posted comments and added to the discussion.