System 7.5: QuickDraw GX Typography Overview (2/95)


This article provides an overview of the typography features of QuickDraw GX.

Introduction
------------
With the introduction of QuickDraw GX, Apple delivers feature-rich imaging to the Macintosh. One of the most noticeably enhanced areas of the Macintosh imaging environment is the concept of intelligent fonts. With TrueType GX fonts, Macintosh users can see fonts with capabilities far beyond those of currently available fonts. These include concepts like contextual forms, ligatures that are employed dynamically, fractions, automatic subscripts and superscripts, automatic kerning, full support for international fonts, and the ability to mix Roman and non-Roman fonts on the same line.

The intelligence to support all these features resides in QuickDraw GX and within the fonts themselves. Applications that support QuickDraw GX and use TrueType GX fonts can rely on the imaging system to implement this new feature-rich typographical environment without having to be concerned with the details of how the type is displayed. QuickDraw GX treats text as a set of characters that can be displayed and edited, and as a graphic object that can be colored, rotated, and manipulated like any other graphic object.

Some of the specific typographical capabilities of QuickDraw GX are:

* Creation of layouts from descriptions of text, styles, and other information
* Automatic creation of contextual forms and ligatures
* Manual and automatic kerning, tracking, and letter spacing
* Sophisticated justification with support for Arabic kashidas
* Hit testing within the text
* Determination of the caret(s) for some location within the text
* Support of applications' line-breaking decisions with fast measurement
routines
* Automatic reordering and rearrangement of text for languages like Arabic,
Hebrew, and Hindi

QuickDraw GX deals with text primarily in "linguistic" terms ("kern by this amount" or "change the orientation of this text in a vertical line") rather than dealing with text primarily in "graphic" terms ("place this glyph at the following (x,y) location" or "set this glyph's rotation to 12 degrees").
The term "layout" is used extensively throughout this document so it is important to understand that layouts (a grouping of text on a single line or the visual ordering of symbols that convey information) are just shapes to QuickDraw GX. As is the case with all other shapes in the graphics system, a layout can be drawn, transformed, dashed, clipped to, and so on. For example, an entire text layout can be rotated by 45 degrees and skewed, yet this transformed layout can still be edited on the fly.

QuickDraw GX has three types of typographical shapes: text shapes, glyph shapes, and layout shapes. All three types of shapes can be used to display text.

Text shapes contain text in one style. Text shapes are the easiest, though least flexible, method for text display. Glyph shapes allow for drawing text in several styles and can be manipulated graphically, such as rotating them. Each glyph within a glyph shape can be drawn at a different angle. Layout shapes are the most sophisticated typographical shape and are the basis for the bulk of the advanced QuickDraw GX typographical features described in this document.
Layout shapes use information contained in font tables (within the font itself) to display text with proper spacing, alignment, specialized glyphs for specific positional situations, ligatures, and various directional flows necessitated by many international scripts.

Much of QuickDraw GX layout functionality happens automatically �? tables in TrueType GX fonts help control the layout process. By this means, applications can get sophisticated linguistic and layout behavior without having to specify parameters to control it and without having to include code to implement it. Although much of this work happens automatically, there are many ways to control the operation. The QuickDraw GX layout routines let features be turned on or off as desired.

Font vendors can create tables that implement a set of features. This scheme is open-ended; font vendors can create new kinds of tables, and QuickDraw GX automatically takes advantage of them. Applications can query fonts to determine the set of features available. The font also supplies a set of strings identifying the features that can be presented to the user.

Additional information on QuickDraw GX can be found in the Inside Macintosh volume on QuickDraw GX available from Addison Wesley.


Article Change History:
14 Feb 1995 - Reviewed for technical accuracy.

Support Information Services
Published Date: Feb 19, 2012