How to set the AA threshold of Cocoa text


Puny Member
Before I explain how to do this I'm going to make clear that there is a HUGE difference in quality of anti-aliasing depending how the text is drawn. If it's drawn using DrawString in QuickDraw you are not getting anti-aliasing but in fact what apple called "text smoothing" which is like a one pixel blur and makes text look like you're extremely drunk. Basically it takes 72dpi rendered text and blurs it.

However text drawn by Quartz (which is to say Cocoa applications and Carbon apps using ATSUI) is anti-aliased and each pixel has it's value calculated based on distance to the edge of a bezier path.

The end result is what I loosely term Carbon text 'smoothing' makes small fonts less legible while Cocoa's anti-aliased text makes small fonts look MORE legible.

This command will set the default AA threshold to 2. This means *if* an application does not set a custom threshold it will use 2 if it's launched after this command is used:

defaults write NSGlobalDomain AppleSmoothFontsSizeThreshold 2