I <3 Steve McConnell*
Coding Horror
programming and human factors
by Jeff Atwood

August 03, 2006

My Love/Hate relationship with ClearType

I've been vacillating a bit on ClearType recently. I love ClearType in theory. A threefold improvement in horizontal resolution on LCDs is an incredible step forward for computer displays. Internet Explorer 7 forces the issue a bit by always defaulting to ClearType for web content, even if you haven't enabled ClearType in Windows XP.

To sweeten the pot even further, Consolas, one of the best (if not the best) fixed-width fonts I've ever seen, is only usable with ClearType enabled.

But in practice, I keep running into problems with ClearType enabled that drive me absolutely bonkers. Check out this shot of Hex Workshop, using the Consolas font, with ClearType enabled:

hex-workshop-cleartype-default.png

What's up with the hideous halation effects around the selected characters? It's unbearable! The obvious RGB noise around the characters is not helping readability at all.

Fortunately, the ClearType Tuner PowerToy lets us tweak this for the better. Switch to the advanced tab so you can use the ClearType Contrast Setting slider. The slider has a range of 1.0 to 2.2, and the changes take effect in real time.

Here's a shot of the same window with 2.2 contrast, the lightest possible.

hex workshop screenshot with cleartype set to minimum contrast

The effect is exacerbated by reducing the contrast, so clearly we have a contrast problem. Let's try turning it all the way up.

Here's a shot of the same window with 1.0 contrast, the darkest possible.

hex workshop screenshot with cleartype set to maximum contrast

Maximum contrast looks good, but it has an unwanted side effect as well-- now bold text looks terrible! Compare for yourself. Minimum contrast at the top, standard in the middle, and maximum at the bottom.

 ClearType bold text, minimum contrast

 ClearType bold text

 ClearType bold text, maximum contrast

Bold text looks best with contrast set to minimum. I just can't win.

I'm currently compromising by sliding the contrast slider over a few notches toward the darker side-- a setting of 1.4 versus the default of 1.6. But no matter how I tweak the slider, there are always places where the text is less legible with ClearType on. Sometimes pathologically so.

I guess it's back to standard greyscale font smoothing for me. It's too bad, because I love Consolas, and I think ClearType is genius-- if they could get it to look good in all situations, and not just for black text on a white background.

Posted by Jeff Atwood    View blog reactions

 

« Shortening Long File Paths A Spec-tacular Failure »

 

Comments

Er.. wow. I didn't realize text rendering was so hideous in OSX.

http://www.agileprogrammer.com/dotnetguy/archive/2006/06/03/15617.aspx

I guess that's something Mac fans don't go out of their way to mention..

Jeff Atwood on August 2, 2006 04:51 PM

The wierd color effects are due to the bitwise color inversion. It's a simple hack to ensure the selection color contrasts with the selection contents, then easily change it back once the selection is gone.

Unfortunately the inversion will produce odd color gradients because it occurs at the bit level. The effect should happen with anti-aliasing too.

Damien on August 2, 2006 05:22 PM

Text rendering on OSX normally looks much better than Windows especially the cleartype variant that uses less colourful pixels for the 'subpixel' precision.

As for Consolas being the best programming font ever.... perhaps with the improvements in Vista but under XP it looks so-so and I'll never get over the annoying looped lower case g.

Try Andale Mono, Anonymous, Bitstream Vera Sans for cleartype capable sweet looking fixed width fonts.

[)amien

Damien Guard on August 2, 2006 05:41 PM

To be fair, that Mac screenshot looks like it was done in Firefox. AFAIK Firefox on MacOS does not (currently) use the advanced typography that is available to Cocoa-based browsers such as Safari. As far as quality of text rendering goes I would say Safari would be as good as anything else out there, any platform.

And what's up with IE7 ignoring your cleartype settings?

Alastair on August 2, 2006 05:46 PM

Another point -- ClearType doesn't work (and is usually disabled) if you've rotated your LCD screen so as to be taller than it is wide (which I have). I don't have effectively 3x greater horizontal resolution! I have 3x greater vertical resolution. All your screenshots look particularly atrocious on my monitor (unless I flip it back around the other way).

Alyosha` on August 2, 2006 06:14 PM

As Alastair said, compare text with something other than Firefox on OS X. Text rendering is actually better on OS X. At least to my eyes. I have not used Vista though. Just ClearType on Windows. And ClearType sucks until you run the Tuner PowerToy.

Diego Barros on August 2, 2006 07:45 PM

Mac fans don't go out of their way to mention it because text on OS X is of very good quality. Firefox is an edge case. In general, most applications on OS X have great looking text rendering. Nice try. ;)

Diego Barros on August 2, 2006 07:59 PM

Apart from one rock bottom IBM model I have never seen any monitor of any type that has been improved by ClearType. No matter how it is adjusted, it always has anomalies. Perhaps it works for mobile phones and such, but not for decent 1280x1024 or higher LCD screens which have no problems displaying readable text to begin with.

"Internet Explorer 7 forces the issue a bit by always defaulting to ClearType for web content"

This is an incredibly bad idea - it will look like crud for most people.

I have a couple of applications where they use ClearType by default and you cannot switch this off and this is very frustrating. What's the point of having a good monitor and excellent eyesight if something is making the text look like you're wearing someone else's spectacles?

Paul Coddington on August 2, 2006 09:06 PM

> Firefox is an edge case

Sounds like Firefox doesn't use the correct font APIs, so it's not a good example.

Jeff Atwood on August 2, 2006 11:01 PM

ClearType in Vista is much better than in XP

Aivar on August 2, 2006 11:06 PM

"it will look like crud for most people"

Um, no. It will look great for most people.

Whenever the subject ClearType comes up a few people always come out of the woodwork and proclaim that ClearType looks UTTERLY HORRIBLY DISGUSTINGLY UNWATCHABLE on their system.

Then they proceed to declare ClearType an utter failure and act as if everyone was already agreed on that.

Newsflash: You're a small minority. The vast majority loves ClearType. Yes, on XP. Yes, on normal-sized LCD monitors. Deal.

Certainly it should always be possible to disable ClearType for those people who apparently have strange issues with it, but defaulting it to "on" is an excellent idea.

Chris Nahr on August 2, 2006 11:12 PM

By the way, Jeff: just in case your strange colorization effecs aren't due to bit inversion, as Damien said, did you try the various ClearType settings for different sub-pixel color arrangement?

Chris Nahr on August 2, 2006 11:13 PM

The problem is not ClearType, it's your sucky hex editor which inverts RGB color values instead of reversing background-foreground and using that to print text.

Try the same font somewhere else (Visual Studio?) and the problem is gone.

W on August 2, 2006 11:16 PM

ClearType *does* work. It's statistically proven, even:

http://blogs.msdn.com/fontblog/archive/2005/12/13/503236.aspx

My problem is the edge cases, as shown in the screenshots.

Jeff Atwood on August 2, 2006 11:20 PM

Erm. This may be just a matter of opinion, but I think the bold text looks better with high contrast. It looks bolder.

I suppose it all boils down to taste.

Steven on August 2, 2006 11:21 PM

I have no idea why the ClearType issue is such a big deal to some small minority of people. All three of the shots that were posted looked almost exactly the same to me. It's not even something that I would notice unless I spent 5 minutes looking for it, which I sadly did.

Sash on August 2, 2006 11:35 PM

Maybe you should try DejaVu fonts. They are not only open source but they contain one of the best (my opinion) mono font. I use it all the time for development.

http://dejavu.sourceforge.net/

Dentharg on August 2, 2006 11:48 PM

I'm a CRT fan. I can't stand LCD's at all - it feels like looking directly at the sun... Dunno why.

I have somehow managed to get hold of Vista's new C* fonts. With standard font smoothing on XP, they are *completely* unusable. Segoe UI, for example, looks grey (!) when enlarged. It's not even near black. On smaller sizes, it's a mish-mash of pixels.

How do things look in Vista? If the new fonts aren't going to be usable without ClearType, I'm doomed.


P.S. Thought I'd mention this - I've switched to plain ol' Verdana instead of a monospaced font, and I'm not looking back. Code looks much more readable to me in VS with a proportional font.

P.P.S. I'm still holding onto the famous "Borland Blue" colour scheme and can't stand programming environments with white background, so I might be an edge case... Just ignore this comment.

Anonymous on August 3, 2006 12:09 AM

> With standard font smoothing on XP, they are *completely* unusable. Segoe UI, for example, looks grey (!) when enlarged. It's not even near black. On smaller sizes, it's a mish-mash of pixels. How do things look in Vista? If the new fonts aren't going to be usable without ClearType, I'm doomed.

Oh yes, this is widely known. All the c* fonts in Vista are designed for ClearType and look like unmitigated ass without it.

Jeff Atwood on August 3, 2006 12:15 AM

You clearly have too much time on your hands if you're futzing with ClearType / font optimizations to make your ID3 tags look good in a hex editor.

Want to ghost write for me? I've got tons of notes for posts; I just need, you know, conjunctions and adjectives and screenshots and stuff.

It's either that or join in with the Open Source fervor of late. I heard SubText needs a CAPTCHA system, and your system is lightyears ahead of anyone else...

Jon Galloway on August 3, 2006 12:53 AM

Yes, light text on a dark background looks bad, but how much of the time are you reading light on dark? I think it's worth a few dodgy-looking glyphs to get normal text looking great.

Rik Hemsley on August 3, 2006 01:11 AM

I wanted to like Cleartype, really I did, but whenever I switch it on I feel like I've taken my glasses off or smudged a thin layer of vaseline across my monitor.

Maybe I just need more time to get accustomed to it, but it does funny things to my eyes.

Ben Moxon on August 3, 2006 01:32 AM

I recently started using two monitors for development. At first the look of the fonts on the second LCD sucked big time! That is until I ran the ClearType Tuner util. Now all is good. The fact that I had to do a web search to figure out that I needed it to improve my fonts is not a good thing. The system should give me almost "best of" results, and then (only then) would I tune it if I was an*l about the look of the fonts. And believe me, I'm sure the system could have easily picked a better choice of how to draw the fonts than what I saw at first. It sucked big time.

Diego Barros on August 3, 2006 03:05 AM

Maybe it's just me, but I don't find any of the highlighted or bolded text particularly unreadable. The third case of highlighted is obviously the best, but the others are readable just fine. My main monitor is a POS crt circa... well, it's old. And that renders fine. My second monitor is a newish Optiquest LCD, and all those characters turn out great. Very little difference on the three cases.

Besides, how long do you work with highlighted characters? Most times all I do is highlight and cut/copy so I can paste it.

Obviously all this comes out through firefox, so that may muddy (or un-muddy) the waters a bit.

JPicasso on August 3, 2006 04:43 AM

The edge problem is cause by the bitwise invertion of the pixel colors. it would look good if winhex would repaint the text with other background/foreground colors as somebody said here in the comments.

I usually don't like cleartype because it makes the text a little bit longer with little font sizes. And cleartype shouldn't be used on CRT's. Use normal aliasing on CRT's.

Sometimes you see screenshots posted with cleartype enabled. That really is ugly as hell! Cleartype should be disabled when grabbing screens. In your post you explain your problem with cleartype so not a problem with this post :)

Consolas is a nice font but I love Andale more. Just a personal preference I think.

Ramon Smits on August 3, 2006 05:35 AM

What bothers me is that that ClearType Tuner, something that you MUST have to make ClearType usable on most monitors, doesn't come with windows. So if you are having issues with ClearType (and it seems at least about 15% to 20% do) you have to go out of your way to fix it.

Of course I turn ClearType off, it's always made things look blury to me, it always has since I first tried to use it. Right now I've had it for the past couple of months (seeing if I can get used to it) and I have trouble reading a lot of stuff on the screen.

It worries me that Vista is going with such heavy reliance on ClearType. It makes me wonder if there will be tuning done for those of us who can't use it (eithor because it makes thinks worse or we have a CRT) or that we are just a small group that it's not worth the extra time.

Fox Cutter on August 3, 2006 10:02 AM

Your vision must be much better than mine. I can't tell any difference among the samples you provided above. I always set ClearType to this max setting and leave it there.

SP on August 3, 2006 01:28 PM

Dude, I totally agree with you their. The who Consolas, ClearType thing is awesome yet it doesn't look good when you actually sit down to program. The little artifcating and coloring around the letters bothered the hell out of me too. I switched back to disabling ClearType because the anti-aliasing of the letters kept making my eyes squint. The reason is I'm so used to crips aliased LCD looking text which in my opinion puts less stress on the eye.

Ralph on August 3, 2006 05:30 PM

On my Powerbook, Firefox and Safari render text exactly the same, to within the pixel ( I just tested it out by zooming in on a screenshot ). Perhaps you have broken your Firefox font rendering somehow, or have selected a different font.

$* on August 3, 2006 09:15 PM

Vista seems to do a better job with Cleartype than XP. You can turn Cleartype off in IE7, and thankfully, it now respects that setting when you install an update (I was one of the vocal louts that screamed for this).

Frankly, I hate cleartype in Vista, no matter how you've tuned it. It is blurry - in fact, cleartype is nothing more than a sophsiticated application of a gausian blur routine. Why would I want BLURRY text on a display that I paid extra for to get crystal sharp pixels?

Frankly, it doesn't make any sense to me, and you can be sure that I will be turning off cleartype in vista as soon as I install it, possibly even before the damn click noise IE installs.

Xepol on August 3, 2006 10:11 PM

I posted a followup entry on my Vertigo blog, here:

http://blogs.vertigosoftware.com/jatwood/archive/2006/08/04/3245.aspx

This has more info on basic ClearType theory and what Microsoft is doing with it in Vista, Office 2007, and IE7.

Jeff Atwood on August 4, 2006 11:11 AM

So what's a CRT-lover like me going to do when Vista comes out? As the Anonymous above, I just can't stand LCD's, and ClearType looks like crap even on Trinitrons.

If the fonts look awful in Vista without CT, it's going to be an unusable OS for me :(

Why can't Microsoft invest some time and money into the issue, and make Vista's fonts look normal on CRT's? I'm not going to use an LCD monitor -- ever. I like my eyesight, thank you very much.

AC on August 5, 2006 03:43 AM

"Er.. wow. I didn't realize text rendering was so hideous in OSX.

I guess that's something Mac fans don't go out of their way to mention.."

It's true. OS X users have been hiding in the corner wishing, praying that Windows users wouldn't realize this. That's why we don't go out of our way to mention it. Ha! :)

Diego Barros on August 5, 2006 03:44 AM

"I'm not going to use an LCD monitor -- ever. I like my eyesight, thank you very much."

Since few companies even make CRT monitors anymore you'll probably have to reconsider when your current monitor dies. Then you'll also discover that your eyes, if anything, will thank you for moving to a completely flat and flicker-free display.

Chris Nahr on August 5, 2006 03:48 AM

Chris, would my eyes thank me in the same way as with roughly 25 monitors with different LCD panels I've looked at so far?

When I say I'm not going to use an LCD monitor, then I mean it, because there isn't a single LCD in this world I can bare looking at for more than two minutes before developing a serious headache.

AC on August 5, 2006 04:24 PM

In that case I'd ask a psychiatrist for advice because those "serious headaches" are most likely psychosomatic. You can't tell me that the biological structure of your eyes and visual cortex are so bizarrely unhuman that you, alone of all people, get "serious headaches" from a type of monitor that virtually everyone else prefers, at least for desktop work.

Chris Nahr on August 6, 2006 12:30 AM

Psychosomatic or not, the fact remains that I can't use LCD monitors. One of my coworkers has also started getting health problems after he got a new LCD; by 2 PM, he's almost unable to look at the monitor anymore and spends most of the time with his eyes closed and his hands covering the eyelids. So with the guy above in the comments, that makes three of us. Quite a few nutcases, eh?

Mind you, I've had problems with CCFL ever since I was a kid in kindergarten, and judging by the number of people with the "sick building" syndrome, I'm not alone.

Anyway, why don't you perform an experiment? Get a houseplant - any houseplant - and place it directly in front of an LCD monitor - any LCD monitor - with the screensaver turned off. Let me know what happens to the plant after a few days.

AC on August 6, 2006 03:01 AM

I have the same problem as AC. About 8 years ago I had never had any problems with any monitor, but at my new job I found I got a eye fatigue with their monitor 17" monitors in any greater resolution than 800x600 and any refresh rate less than 85HZ. I also had to turn down the brightness and reduce the contrast. On my 17" Nec monitor at home I could up it to 1024x768 and 100HZ.

At work my PC has just been upgraded, and the new monitor is a Dell E176FP a 17" LCD monitor, I am getting this same eye fatigue, it feels as if there is pressure on my eyeballs. Unfortunately there are no colour temprature controls and the brightness and contrast do not seem to work the same as CRT controls

Peter Nimmo on August 7, 2006 07:57 AM

"Whenever the subject ClearType comes up a few people always come out of the woodwork and proclaim that ClearType looks UTTERLY HORRIBLY DISGUSTINGLY UNWATCHABLE on their system."

I do talk to other people and I do get to see a lot of different monitor types (I am in a different workplace every few months). And I am not making presumptions, or being authoratative - merely reporting my personal observations (obviously).

(And I am a human being, not something that crawls out of the woodwork...)

I'm sure you could find a majority of people who can't tell the difference between a boom box and a $50K HiFi system, or who can't tell the difference between two shades of the same colour, or between a VHS tape and a DVD, or between a fair trial and a kangaroo court.

In fact, in Australia right now you can find a majority of people who think recycled water is not fit for drinking compared to bore water even though it is provably cleaner (and many of them already drink river water that has sewage dumped in further upstream). They would rather live in perpetual drought than have recycled water.

Majority opinion is often invalid and is often a poor method for justifying decisions.

In the end, I will still believe my own eyes that having text fade in and out in contrast with prominant multicoloured fringes makes it harder to read.

Yes, it is a concrete improvement on early model low-resolution cheap LCDs (as previously stated), but I still think you are wasting your time using it on say, an Eizo monitor where the pixel arrangement and behaviour are the same as a CRT monitor, only clearer. Under these circumstances no amount of tuning produces a readable result.

As a subpixel has to be brightly coloured by definition, ClearType has to produce coloured fringes. This is unavoidable, it is what Clear Type does.

Yes, some monitors blur the subpixels together (then it works) and, yes, there are people with low resolution screens who are sitting way back from them who will find it improved.

And yes, they may well be the majority - some people even sit with their 15" monitors 4' away set at the lowest frequency interlace mode possible, 640x480 with the contrast and brightness turned up 100%, and they are happy with this.

But, if you are using a high resolution monitor with a CRT-style pixel structure at normal reading distance, of course it's going to be awful.

And the point I'm making is that this is a problem where application developers do not allow ClearType to be switched off. If I could switch it off in all cases, I wouldn't care.

There is no point in claiming it suits the majority when you can have it suit everyone 100% of the time by providing a checkbox to turn it on or off.

But I also strongly suspect that it is not wise to make ClearType default in future operating systems because the LCD monitors that are coming out now and in the near future will tend not to have the problems that ClearType is addressing.

BTW This statistical test - I find it hard to assess this as I would have to trudge out to the library to find the paper (the web article does not tell me enough to determine whether the experiments were scientifically valid or naive).

"...One of my coworkers has also started getting health problems after he got a new LCD; by 2 PM, he's almost unable to look at the monitor anymore and spends most of the time with his eyes closed and his hands covering the eyelids."

I found this as well with the early LCDs. The problem I think was that they were too small for the default resolution, forcing one to lean forward to read tiny text on a monitor that had to be placed too close for comfort (causing neck problems and headaches). Also, the gamma was completely wrong (2.6-2.9 instead of 2.2) so they could not be adjusted to display correctly (unavoidable harsh glare). And they flickered incessantly (see below).

Try an EIZO or other quality brand, 19" screen size minimum (for 1280x1024) - they are accurately calibrated, fully adjustable and gentle on the eyes. A 19" monitor is large enough to read from a comfortable distance without straining. By quality brand, I mean in terms of picture, not "branding" (ability to truly display sRGB or better rather than dither significantly fewer colours), accurate levels, accurate gamma, etc). Unfortunately, this does not come cheap, so CRTs are still more cost-effective for many people.

"Then you'll also discover that your eyes, if anything, will thank you for moving to a completely flat and flicker-free display."

This is a commonly quoted myth. LCD screens do flicker, they just do it differently. In the case of cheap LCDs that cannot render the full sRGB gamut, I suspect the flicker is due to pixels being dithered over time to create the illusion of extra colours. This creates a 'rippling water' effect travelling down the screen, particulary on certain colours (such as the shade of blue Microsoft uses for the Windows XP desktop). When natural ambient light is used, the backlight flicker is also noticeable on some models.

Paul Coddington on August 28, 2006 02:56 AM

"In that case I'd ask a psychiatrist for advice because those "serious headaches" are most likely psychosomatic..."

Ad hominum, ad hominum, ho-hum-inum...

Biological variation is the norm. I used to teach undergraduate animal physiology laboratory streams, and chances are, if several entire classes are dissecting baby pigs this term, you'll find one with an extra lobe on it's liver, or it's organs arranged back-to-front. We didn't fail people for drawing what they saw.

Some people have better eyesight than others. Some people have more accurate perception than others. Some are more or less sensitive to various issues than others.

The problems being discussed here may not be visible to some for no other reason than their monitor does not display it in a way that shows the difference.

Paul Coddington on August 28, 2006 03:23 AM

Consolas looks particularly bad in PuTTY.
http://mikelward.com/screenshots/putty-bold

To make PuTTY use bold fonts, you need:
- Bolded text is a different colour unticked
- Use system colours ticked

Mikel Ward on August 6, 2007 08:40 PM

Welcome dear users.
We are glad to present you an internet resource of earnings at the highest level. You will find here a great opportunities not used before by another similar sites. Besides our support service is always ready to listen to your ideas directed on optimization and addition of another opportunities for the most comfortable and interesting using of our site.

We propose for our users: First level referal bonus - $0.03
- Requiring payment deliveries by a cost from $0.002.
- Requiring payment clicks by a cost from $0.0015.
- 4 currencies is avaliable for payments: US dollars, EURO, UA Gryvna, RUR!
- CASUAL PAYMENTS for all of users.
- COMPETITIONS referals, advertisers, active users.
- Surfing of sites.
- Letters are paid similarly with the news of our site!
- Exchange of referals.
- Exchange of accounts.
- Exchange of credits.
- Games.
- Minimum to payment $0.10.
- Ref-system 3- level 15% - 10% - 5% - .
- Referal level from advertising 3 - level 10% - 5% - 2% - .

For advertisers there are the most advantageous suggestions:
- You donєt need to sign-up for make your advertising orders.
- Most various types of advertising: deliveries, clicks, surfing, text links, banners, HTML advertising
- All of letters are sent automatically.
- Now there is not a necessity round the clocks to wait the booked advertising you. Your advertising takes a place automatically!
- Complete checking of the booked advertising feature in real time.
- Detailed tuning at forming of advertising.
- It is not needed to pay anymore. The unutillized money return for advertising.
Paid to reed

Negr on January 24, 2008 09:55 AM







(hear it spoken)


(no HTML)




Content (c) 2008 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved.