Mac OS X Anti-aliasing

about | archive


[ 2003-November-24 12:25 ]

Daring Fireball: Anti-Anti-Aliasing:

My gripe from last week is that Safari anti-aliases small monospaced fonts such 9- and 10-point Monaco. This is true, but somewhat misguided. The anti-aliasing is an effect of the problem, not the cause. [...] The cause of the problem is that Safari prefers outline fonts over bitmap fonts, in all cases. Most Mac OS X applications instead prefer a bitmap font, if available, for small-point monospaced typefaces.

Dave Hyatt's comments on this problem:

The problem of not obeying the OS setting is actually Safari's fault, in that we actually measure text using lower level CG APIs than the more commonly used (and recommended) CG APIs. These lower level APIs do not look at the OS setting, but they are faster (especially for measuring), and so ultimately we gained speed but at the expense of honoring the OS settings.

I'm fighting this same problem in my port of Scintilla to Mac OS X, where I am using ATSUI to draw text on the screen. These articles describe the problem in great detail, but do not mention how to actually fix it in code. Any solutions that provide technical details would be greatly appreciated.