|
|
Getting Started with Text & FontsTechnology OverviewText and fonts permeate the user experience on any computer, regardless of the operating system. The two work together: text provides the written representation of a language and a font provides a set of character representations (glyphs) in a particular typeface that is used to render text to a display or a printer. When designing your application, you’ll want to take advantage of Apple’s built-in support for high-quality text rendering, resolution-independent fonts, and Unicode. You use the Mac OS X APIs for text and fonts to take advantage of the built-in support as well as to customize text and font handling so that your application can:
The text system in Mac OS X is layered. Typically you write code using high-level APIs. For specialized needs you can use lower-level APIs or Quartz directly. ![]() Start HereBefore you write code that works with text and fonts, read:
Java (J2SE) developers can read “Java 2D” in Java Development Guide for Mac OS X to learn how Java text and graphics in Mac OS X differ from Java text and graphics on other platforms. Choose a Learning PathWhether you’re developing in procedural C or Objective-C, you can use Apple’s superior user experience for text and fonts to improve your application. You might want to allow users to enter text in an editable field, support basic text editing, support sophisticated typography, manipulate text strings, or manage fonts. Java (J2SE) developers can consult the Sun Java website. If you develop in procedural C, use the Carbon frameworks. If you develop in Objective-C, use the Cocoa frameworks. The following subsections provide cross-references to Carbon and Cocoa documents appropriate to specific tasks. Creating a Text Editing FieldYou can use Interface Builder to provide editable text fields for data entry and editing of small amounts of text. In Interface Builder, you can get a text field by simply dragging a one from the text palette to the appropriate window. Carbon applications use the field Working with Text StringsYou can create, copy, compare, and search for text strings, convert between string encodings, and perform a number of other operations on string data.
Supporting Text EditingYou can add text editing capabilities to your application so that users can create and edit documents.
Supporting Sophisticated TypographyYou can customize text layout and rendering when you need more than what’s built in to Mac OS X.
Managing FontsYou can programmatically manage fonts individually or as a group and provide an interface for users to change fonts.
Next StepsThe Text & Fonts Reference Library contains some resources you’ll want to keep up to date with. You can bookmark each of them for easy access:
|
Last updated: 2007-12-11
|