Eric Bergman-Terrell's Blog

Blurry Text in WPF
March 30, 2008
WPF App running on XP with ClearType enabled, with apologies to The Outer Limits
WPF App, XP, ClearType enabled
Windows Forms App running on XP with ClearType enabled, with apologies to The Outer Limits
Windows Forms App, XP, ClearType enabled
NOTE: As of .NET 4.0 the "fuzzy fonts" problem in WPF has been fixed. This blog post applies to previous versions of WPF.

When I started WPF (Windows Presentation Foundation) development, I ran the Visual Studio "Orcas" betas in a virtual machine. I immediately noticed that text was blurry in the WPF apps. But I figured that the VM software was at fault. Imagine my surprise when I ran my WPF applications outside of the virtual machine, and noticed the same problem: all the text in the WPF applications was slightly blurry. The degree of blurriness varies from monitor to monitor, but it's bad on all the monitors that I own.

From what I've learned by Googling with search terms such as WPF "blurry text", WPF, unlike other Windows development environments such as Windows Forms and Win32, does not distort fonts to make them appear sharper on the screen. I can certainly see the advantages of rendering text on raster display devices in a way that is more faithful to what the font designer intended, but in applications where people actually read text, this is a big problem. For example, I'd love to convert my Vault application to WPF to take advantage of WPF compound documents, but Vault users spend most of their time reading text in the application. I don't think most of them would be willing to trade sharp text in for the many compelling advantages of the WPF platform.

Microsoft does provide an on-line ClearType Tuner and a "Power Toy" version. If you write WPF applications just for your own use, or for a small population of users, it might be acceptable for your users to tweak their font settings with these programs. But if you support a large, geographically distributed population, I'd recommend that you show your users prototypes of WPF applications before deciding to embrace the WPF platform, at least for text-intensive apps.

As of WPF version 3.1 there is no way to turn off this "greater accuracy / less readability" property of WPF text. I can think of one way workaround this issue, but it's truly heinous, from a technical standpoint. I might write an article about it if I can sugar-coat it in some way.

A picture is worth a thousand words. Paul Stovell has some great comparisons of WPF and Win32 text on his blog.

Here is a good discussion of the issue, with replies from Microsoft employees about this issue: Blurry text in WPF - current status?

I have to wonder if this issue is at least partially responsible for the dearth of commercial WPF applications at the current time.

To be fair, this issue is not unique to WPF, other platforms that do sub-pixel text rendering have this problem, to some degree or other. Flash, Mac OS, and Window ClearType all do sub-pixel font rendering. All I want is a fine-grained mechanism to selectively disable this in any WPF applications that I write. For example, I should be able to disable sub-pixel rendering every in an application, or just for menus and button text, and so on.

Additionally, this situation is likely to improve as the DPI (dots per inch) of LCD displays increases. But it seem like in recent years LCD display manufacturers have concentrated on increasing the resolution and physical size of display screens, rather than the DPI. But for an application developer writing applications today, it may be a long wait for LCD display technology to catch up.

WPF App running on XP with ClearType enabled, with apologies to The Outer Limits
WPF App, XP, ClearType enabled
Windows Forms App running on XP with ClearType enabled, with apologies to The Outer Limits
Windows Forms App, XP, ClearType enabled
Keywords: WPF, Windows Presentation Foundation, Text, Fonts, Blur, Typography, ClearType, ClearType Tuner, PowerToy, sub-pixel text rendering, Flash, Mac OS, DPI, LCD

Reader Comments

Comment on this Blog Post

Recent Posts

TitleDate
How to decompile Java code with JetBrains IntelliJ IDEA (2018.2.3, Windows 10)October 5, 2018
Java Programming Tip: SWT Photo Frame ProgramOctober 31, 2016
Vault 3 (Desktop) Version 1.63 ReleasedSeptember 9, 2016
"Compliance with Court Orders Act of 2016"April 9, 2016
Disable "Visual Voicemail" on Android / T-MobileJanuary 17, 2016
IPv6 HumorDecember 10, 2015
Java Programming Tip: Specify the JVM time zoneDecember 7, 2015