Core Text is an advanced, low-level technology for laying out text and handling fonts. It is designed for high performance and ease of use. The Core Text API, introduced in Mac OS X v10.5, is accessible from all Mac OS X application environments. It is also available in iOS 3.2.
The Core Text layout engine is designed specifically to make simple text layout operations easy to do and to avoid side effects. The Core Text font programming interface is complementary to the Core Text layout engine and is designed to handle Unicode fonts natively, unifying disparate Mac OS X font facilities into a single comprehensive programming interface.
This document is intended for developers who need to do text layout and font handling at a low level. If you can develop your application using higher-level constructs, such as NSTextView
, then you should use the Cocoa text system, introduced in Text System Overview. If, on the other hand, you need to render text directly into a Core Graphics context, then you should use Core Text.
More information about the position of Core Text among other Mac OS X text technologies is presented in “Mac OS X Text Technologies.”
This document is organized into the following chapters:
“Core Text Overview” describes the Core Text system in terms of its design goals and feature set. It also introduces the opaque types that encapsulate the text layout and font handling capabilities of the system.
“Common Operations” presents snippets of code with commentary illustrating typical uses of the main Core Text opaque types.
In addition to this document, there are several that cover more specific aspects of Core Text or describe the software services used by Core Text.
Core Text Reference Collection provides complete reference information for the Core Text layout and font API.
CoreTextTest is a sample code project that shows how to use Core Text in the context of a complete Carbon application.
CoreTextArcCocoa is a sample code project that illustrates the use of fonts, lines, and runs in a Core Text Cocoa application.
Core Foundation Design Concepts and Core Foundation Framework Reference describe Core Foundation, a framework that provides abstractions for common data types and fundamental software services used by Core Text.
The following documents provide entry points to the documentation describing the Cocoa text system.
Text System Overview gives an introduction to the Cocoa text system.
Text Layout Programming Guide describes the Cocoa text layout engine.
Last updated: 2010-03-03