Programming with Quartz: 2D and PDF Graphics in Mac OS X

Quartz provides high-quality text rendering in Mac OS X, including the drawing of high-quality anti-aliased text using several different user-selectable anti-aliasing algorithms. The Mac OS X user interface is built on top of Quartz text drawing. This is one of the reasons that the user interface in Mac OS X looks so good.
The Quartz API provides low-level text drawing functions and a drawing model that, for the most part, is intended as building blocks for other system services to use. Quartz performs no text layout, only text rendering. As a general rule, most applications are better served by the higher-level framework text facilities that are built on top of Quartz. These frameworks provide higher-level text support including full Unicode text support and text layout. Most Cocoa applications are best served by using the Cocoa text classes and methods. "Drawing Text Using Cocoa" (page 306) discusses many of the options available to Cocoa applications. Some of the different text APIs available to Carbon applications are discussed in "Drawing Text Using Carbon" (page 324).
The text drawing services available in the different application frameworks are built on top of Quartz. By reading this chapter, you'll learn about the low-level Quartz text drawing functions and the graphics state and context parameters that affect how Quartz renders text when you use the Quartz APIs directly. The text drawing parameters are important to understand if you use the Quartz API rather than the framework text APIs built on top of Quartz. In many cases,...