einserver.de

Font Smoothing Trouble and Help

A solution for poor text rendering in TextMate or OS X in general when it comes to light on dark text.

A tale of bad rendering

When I found Solarized while working on my Mac Pro, I just had to share it with you, as it looked really good. Today I installed it on my MacBook Air aswell and realized that even if the author put a lot of work in it and tested it very well: Solarized doesn't work well on all my Macs. In fact, the dark version looks really bad on my MacBook Air.

My first solution (and the reason for this post, which was previously titled differently) was to use another great theme I found on GitHub called Tomorrow. It has bigger contrast than Solarized, looks beautiful and works very well. Except for the dark version which renders the code unreadable just like Solarized does.

I began to realize that it's not the new theme which brings the problems (I tried Twilight and others with similar results) and began looking for a solution. After looking through some posts bashing the font smoothing of OS X (which I will alway prefer over Windows ClearType) I remembered of something I did when I got my Eizo display for my Mac Pro: I changed the FontSmoothing to a value which is no longer available via the System Preferences in Snow Leopard.

The solution

Just put this in your Terminal and log out and back in to see the result:

defaults -currentHost write -globalDomain AppleFontSmoothing -int 1

Source and detailed explanation: hints.macworld.com In case you want to revert: Just open the Appereance panel in System Preferences and check Font Smoothing there.

This won't work for everyone and you might have to find the perfect value for your display by try and error but for me it increased overall readability not only in TextMate but everywhere else too, so you might want to try it at least.

Now I can enjoy Solarized and Tomorrow and the only trouble left is to decide which one to use.

So long.