NextContents


The mort table


The glyph effects in a TrueType GX font are defined in the glyph metamorphosis table ('mort'). The 'mort' table is very powerful and complex, which is why this chapter is devoted almost entirely to just this one table.

TrueEdit allows font developers access to a wide range of pre-defined glyph effects, but the range of effects possible in 'mort' is much, much wider. To help you understand the possibilities -- and what's going on inside 'mort', even if you only use TrueEdit -- this section reviews the structure and function of the mort table. For full information, see the document "QuickDraw GX Font Formats".

This section also introduces the Font Feature Registry, included in this manual as Appendix B. The feature registry contains the official definitions of the standard glyph effects implemented in TrueEdit.

Basic concepts

The 'mort' table uses only a few simple logical structures; it derives its power from sequences and combinations of these structures.

This section describes the operation of glyph effects, and the basic organizational mechanism of features. It is important to understand these concepts thoroughly before you begin to build a mort table for your GX font.

Four kinds of glyph effects

Each glyph effect in a GX font can be thought of as a "black box" function, where the input and output are glyphs.

There are four basic kinds of glyph effect:

Non-contextual


One input glyph becomes another output glyph. Small capitals are an example of this kind of effect: all lowercase letters are mapped to their small-caps equivalent, regardless of their position within the word or line.

Ligature


In this type of effect, multiple input glyphs become a single output glyph. Ligatures used in traditional typography are the most recognisable example of this kind of effect, hence the name "Ligature glyph effects".
In the word "official" in the example above, the three glyphs for f,f, and i are replaced by a single "ffi-ligature" glyph.

Contextual


For contextual glyph effects, several glyphs are examined, and the output for one glyph position depends not just upon the input glyph in that position, but also upon the input glyph's position within the text and the glyphs adjacent to the input glyph.
The example above illustrates the contextual nature of these effects. The standard "A" glyph is replaced with a swash form on the word "An", but not on "Apple", because the context of the "A" in "Apple" did not match that required for the "Line Initial Swashes" (the "A" in "An" is at the beginning of a line, so it gets a swash form; the "A" in "Apple" is not, so does not).

Rearrangement

Multiple inputs, multiple outputs (same glyphs, rearranged). This feature is not used in Roman-script typography. However in a somewhat desperate attempt to find an example of glyph rearrangement in Roman typography, the translation of a sentence to "pig latin" could be implemented using glyph rearrangement, as shown above.

The "pig latin" effect does include glyph insertions in addition to rearrangement, but the important thing to note is that the input glyphs have also been placed in a different order by the "Oink!" feature.

In use, each glyph effect in a GX font is either on or off. If the effect is off, then the input glyphs pass through unchanged. If the effect is on, the input glyphs are subjected to the defined effect.

Table structure

A font's mort table is a sequence of glyph effects. The original string of glyphs - essentially, what the user typed - is processed through each glyph effect in the font, in sequence. The final result -what GX displays - depends on which effects are on, which are off, and what order they're in. Each effect potentially increases the number of possible inputs to the next effect.

In defining each glyph effect, you must be careful to account for all possible outputs of all the effects preceding it in the font.


The last section of this chapter includes a detailed discussion of ordering and interdependencies for glyph effects.

Features and settings

QuickDraw GX allows a font's end user to control which glyph effects are on and which are off. The external interface to the 'mort' table, however, is very different from its internal organization.

The feature table ('feat') organizes a font's glyph effects into different groups, or features. Each effect within a group is called a setting of that feature. For instance, the feature "Letter Case" has as its possible settings such glyph effects as "Upper and Lower Case", "Small Caps", and "All Caps''.

The purpose of features is to coordinate the application of glyph effects. There are two kinds of features:

"Letter Case", for example, is an exclusive feature - it would not make much sense to apply both "Small Caps" and "All Caps" effects to the same text. "Ligatures", on the other hand, is a cumulative feature: "Common Ligatures" can be applied with or without "Rare Ligatures", and vice versa.

Exclusive features must have at least one empty setting: an effect which does nothing except give the end user a way to turn off the other settings. For cumulative features, the user can turn off each setting individually.

The 'feat' table also points to identifying names for each feature and setting, stored in the font's 'name' table.

Terminology in this manual

This manual uses simplified terminology for glyph effects. In addition to features and settings, the technical documents for GX typography refer to subtables, subfeatures, selectors, feature types, chains, and several other entities. Each term means something different, and the distinctions are important to programmers creating GX applications.

These distinctions are not important to most font developers creating GX fonts with TrueEdit. This manual uses the general term glyph effect to refer to several different aspects of 'mort', but it is usually equivalent to the more technical term subtable.

If you do refer to other GX documents, be prepared for these differences in terminology.

The Feature Registry

There is no universally prescribed set of default font features; the architecture of font features is open-ended, and each font defines its own parameters. This chapter just lists every possible thing you can do; a single font doesn't have to contain all - or even any - of these things.

In practice, an application selects the features of a font by means of numeric identifiers, and not by name - after all, smart as GX is, it can't be expected to realise that "Small Capitals" in English is the same as "Kapitälchen" in German or "Küçük Büyük Harf" in Turkish.

The Font Feature Registry ensures that the same numeric identifier is given to the same feature across all GX fonts. The Feature Registry is simply a list of all known features of GX fonts, together with their unique numeric tags. This list is maintained by Apple Computer, and is freely available to anyone who wants to use or develop GX fonts or applications.

If new or unusual features are added to a GX font, they must be registered in the Feature Registry, even if they're one-off, "never to be repeated" things. You might not ever want to make another font with "Upside-down Numerals", but there's always someone out there who might...

There are three very good reasons for registering a font feature in the Font Feature Registry:

How to ask for a new feature

To obtain the latest version of the Feature Registry, or to request new features, contact the Apple Typography group at the address:

fontregistry@applelink.apple.com


TrueEdit supports nearly all of the glyph effects defined in the Feature Registry as of this writing. The few exceptions are noted in this chapter, under the discussion of the unsupported effects.

The Feature Registry is included in this manual as Appendix B. In this chapter, the glyph effects will be presented according to typographic themes. This results in a different order than that in the Feature Registry. In practice, features may not appear as radio buttons and check boxes, and cumulative and exclusive behaviour may not be apparent to a font's end users. While this chapter will describe each glyph effect individually, the discussion is organized by features and settings.


NextContents

Arleigh Movitz (movitz@apple.com)
Dave Opstad (opstad@apple.com)
Kristian Walsh (walsh.k@euro.apple.com)