QuickDraw GX: How GX Fonts Differ From TrueType Fonts (5/96)


How does a QuickDraw GX specific font differ from a TrueType font?


In QuickDraw GX, a letter seen on screen may not actually be representative of a single keystroke on a keyboard. QuickDraw GX introduces Characters, Glyphs, and codes to aid in generating a character or group of characters on screen.



A character is an abstract object having a single and unique semantic or phonetic meaning. A glyph represents the visual, graphical appearance of a character. For example, the glyphs for bold A, italic A, and underlined A are all graphical objects which may all be used to represent the character "A."



A font is a collection of glyphs that usually has some element of design consistency in appearance (such as serifs or stroke thickness), along with other information such as which glyphs represent ligatures or contextual forms.



Glyphs do not have a one-to-one relationship to characters: a given character may be represented by one or more glyphs (for example, "i" could be represented by 2 glyphs: a vertical stem plus a dot above the stem), and two or more characters can display as a single glyph. Context also affects the glyph used to represent a character. For example, in a cursive font a character may have four glyphs: a separate glyph for the character at the beginning, middle, and end of a word, and a glyph for the character in isolation. This is particularly true in context-sensitive written languages such as Arabic.



A complex font contains information associating some glyph indices with certain combinations of characters and rules. For example, information in a font may associate the glyph ID (or code) $1A01 (which happens to have the appearance "fi" - where the f and i are connected as a single character) with the combination of the two characters $0066 ("lowercase f") followed by $0069 ("lowercase i"). Any font lacking such associative information is called a simple font. All TrueType fonts released with System 7.0 and System 7.0.1 are simple fonts.



The glyphs in a complex font can be divided into two classes: rendering forms, for which combination rules appear, and character glyphs, which have a one-to-one correspondence with character codes. Rendering forms include ligatures, applied marks, and contextual forms. In general, only character glyphs will contain entries in the font's character-to-glyph mapping table (since QuickDraw GX uses other tables in the font to generate rendering forms).



In order to utilize the new functionality in the QuickDraw GX, fonts must carry font information in the form of font tables describing the attributes for such things as baselines, glyphs, metamorphosis, kashidas, and more. TrueType GX fonts have these font tables.



In addition, a new style variation feature has been added to some fonts.



Font Families

-------------

The term font family refers to a group of fonts that share many characteristics. Helvetica, Helvetica Bold, and Helvetica Narrow are examples of fonts in a font family. Previously, a FOND resource was used to indicate font families. QuickDraw GX uses the font name table to detect font families instead of the FOND resource.



Extended Styles

---------------

QuickDraw supported the model of a font family with a set of predefined styles. These were plain, bold, italic, condensed, extended, underline, outline, and shadow. When a font was wanted in a certain style, it was left up to the Font Manager to first search for a font in the system that matched the desired style, and if one was not found, to algorithmically create the style from plain.



The new font system supports the model of a font family with an arbitrary number of named styles. Each style represents a designed typeface, such as "Regular," "Bold," "Demibold," and "Extra Condensed." The new graphics system supports variable amounts of algorithmic styling to be applied to the specific typeface supplied by the application.



Style Variations

----------------

A new style option is the concept of style variations. Similar in capability to Adobe's Multiple Master technology, these new fonts can support many degrees of boldness, condensing, or other features from one typeface. The font has multiple styles of a typeface built in to itself. The system then can interpolate between the styles to create type with a specific look. A font variation is an algorithmic method for producing a specific style along a variation axis, or range of font styles. That specific instance of a font style would be called a font instance.



Since such latitude exists with a single font, an entire page can be laid out using only one font. However, by varying the style, it will not look monotonous. In addition, style variation can be used by an application to substitute for a font that is not available in the system and still maintain the same spacing. This avoids reflowing of the document.



Font Files

----------

QuickDraw supported only fonts that were stored as resources. The new font system allows a font to be stored in a file's resource or data fork, or simply handled in memory. In addition, fonts that are stored in files never need to be read into memory all at once, allowing applications to use and edit fonts that need to be disk resident because of their size (for example, Asian fonts, which are about 6 megabytes per font).



Font Names

----------

QuickDraw relied upon the resource name to identify the font families. This made it impossible to have multilingual family names and provided no support for arbitrarily named styles. The new font system supports fonts with multilingual names for their family and style, as well as names describing the typeface itself (Helvetica Bold), a unique name (Apple Computer Helvetica Bold 10), and others.



Open Font Architecture

----------------------

The new graphics system has been designed to accommodate multiple, separately loadable scalers. Initially, only TrueType and Type 1 (from Adobe) scalers will support this interface, but over time it may be used by other scaler types.



The new scaler interface, Font Scaler API, is defined. The TrueType scaler was modified to adhere to the new interface. Adobe implemented a compatible version of their Type 1 scaler, which will be shipped with QuickDraw GX as part of ATM GX. The new graphics system accommodates the interface, such that the particular scaler will be invoked based upon the font currently selected by the application.



Adobe will store Type 1 fonts as "sfnts" (as TrueType fonts have been), but will include new outline and hinting table(s) for the Type 1 data. In this way, the Font Manager will not need to change to accommodate Type 1 fonts, yet Type 1 fonts will be fully functional under QuickDraw GX.





Article Change History:

15 May 1996 - Corrected the word monotonous.

23 May 1995 - Replaced high ASCII characters with simpler explanations.

14 Feb 1995 - Reviewed for technical accuracy.



Published Date: Feb 19, 2012