BackContents


Working with Glyph Classes


A font may be organized into a number of different groups or classes of glyphs, according to similarities in glyph design, the logic of glyph effects, and other factors. TrueEdit lets font developers create glyph classes, then work with each class as a unit instead of as individual glyphs. This approach can help streamline some repetitive and time-consuming tasks. For example, in a Roman font the glyphs for f and for all of the ligatures beginning with f have the same shape on the left side. Thus, they can be treated as a class for kerning and for optical alignment:

TrueEdit supports glyph classes through the class table (clas). In the clas table, glyphs can be collected in named groups according to the logic of the font designer. The clas table is a TrueEdit source table, used for font production only. In TrueEdit 2.0, the kerning and optical bounds editors support glyph classes. Specific instructions for using glyph classes with these editors are included in Chapter IV: Position effects. Glyph class support may be added to other areas in future versions of TrueEdit.

Creating a class

Creating a glyph class uses many of the basic TrueEdit operations described in the section "Working with tables". To create a new 'clas' table and add your first glyph class:

  1. Choose New Table from the File menu, or press Command-N. The New Table dialog box appears. Choose "glyph classes" from the popup menu, and click OK.
  2. The tag clas is added to the list of tables in the font's Tables window. Select the clas tag in the Tables window. Choose Open Table from the File menu, or press Command-T. The Glyph Classes window appears. You can also double-click the clas tag in the Tables window to open the Glyph Classes window directly.
  3. The Glyph Classes window is empty at first. As you add and define glyph classes, they will be listed alphabetically in this window. Choose Add Entry from the Edit menu, or press Command-A. The Add Class dialog box appears.
  4. Type a name for your glyph class, and click OK. The Glyph Classes window now shows the new class name.

There are no rules about naming glyph classes, except that each name must be unique within the font. A class is used only within TrueEdit, and is not seen by the font's end user.

Editing a class

The basic operations for editing a glyph class apply throughout TrueEdit, wherever you need to edit sets of glyphs.

Adding glyphs

To add glyphs to your new glyph class:

  1. Select the class name in the Glyph Classes window.
  2. Choose Edit Entry from the Edit menu, or press Command-T. The Glyph Class editor window appears. You can also double-click the class name in the Glyph Classes window to open the Glyph Class editor window directly.
  3. The rectangle at the top of the editor window marks the live area of the window. Open the Glyph Palette if necessary. Choose Glyph Palette from the Edit menu, or press Command-L. Select the glyphs you want to be part of the class.
  4. Drag the selection from the palette to the live area of the editor window.

The live area is highlighted when the pointer is over it. Remember to release the mouse button to complete your selection, then press again to drag the selection to the editor window. When you release the mouse button, the Glyph Class editor window updates to show the new glyphs in the class. (In some circumstances, the window will not update completely until you close and reopen it. The contents of the glyph class are not affected.)

The blank spot after the last entry is the new live area. If the live area isn't visible, use the scrollbar to move up or down in the window. To add more glyphs to the class:

  1. Select the glyphs you want to add to the class.
  2. Drag the selection from the palette to the live area of the Glyph Class editor window.

Deleting glyphs

To delete a glyph from a class:

  1. Select the glyph in the Glyph Class editor window.
  2. Choose Clear from the Edit menu.

Managing glyph classes

You may find that you have created a wide variety of glyph classes for your font. A few additional operations will help you manage your glyph classes.

Removing a class

To remove a class:

  1. Select the class name in the Glyph Classes window.
  2. Choose Clear from the Edit menu, or press Delete. The class name disappears from the list.

Renaming a class

You cannot change the name of a glyph class once you have created it. As a workaround, you can remove the class from the Glyph Classes table, then recreate it under a new name.

Copying classes

Glyph classes are defined in the 'clas' table of a font. Although you can't copy individual classes from one font to another, you can copy an entire 'clas' table.

[!]Copy the 'clas' table with caution, because it refers to the glyph numbers in the original font. If the destination font has a different set of glyphs, the copied glyph classes will make little or no sense. If the fonts are very different, you could corrupt the destination font or even crash TrueEdit.


BackContents

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