TUGboat, Volume 24 (2003), No. 2 183
pretation of Apple’s licensing agreement leads me to Font Forum believe that any such parsing or conversion would not be allowed by that license. However, having purchased Mac OS X and its There is no end: Omega and Zapfino $10,000 worth of fonts, one cannot help but wish William F. Adams to use them. Although Zapfino works well in “Co- coa” programs in Mac OS X such as TextEdit.app, Abstract its special features such as ligatures are enabled by The future of type is OpenType (Adobe and Mi- AAT which is unfortunately not supported by the crosoft’s successor to Apple’s “Royal” font technol- more traditional “Carbon” Macintosh applications ogy which was licensed to Microsoft as TrueType), in which class all mainstream graphic design appli- 2 Unicode, and other extensions of TrueType and the cations are, at this writing. This is unfortunately Type 1 font format such as ATSUI (Apple Typo- quite limiting: either one must limit oneself to Co- graphic System for Unicode Information). While coa applications, or in applications such as InDesign, TEX has been extended to support other new for- make use of its Glyph palette to insert alternates and mats and standards such as .pdf, support for the ligatures by repetitive pointing-and-clicking. Since new font formats has been limited at best. there is no TEX variant which can access system 3 Fortunately, for Unicode in TEX, we have Omega, fonts on Mac OS X as of this writing, one must which coupled with the other strengths of TEX, can develop a work-around which allows one to access be sufficient to take advantage of new technologies arbitrary fonts from within TEX and to simulate the even without explicit support, by using the proper sophisticated typesetting capabilities of OpenType (or improper) techniques. or Apple Advanced Typography. This paper will be an explanation and explo- The large character sets of fonts such as Ap- ration of this, looking at a specific font and format ple Chancery or Zapfino make accessing characters (the .dfont ATSUI-enabled version of Zapfino), ar- in 8-bit blocks untenable, so Omega is an obvious guably very nearly a worst-case scenario, and how choice. This serves two purposes: first, it makes the it can be dissassembled into individual glyphs and typeface, Zapfino by Prof. Hermann Zapf available seamlessly stitched back together to automatically for use in TEX by way of Omega; second, it provides insert ligatures and swash and variant forms using an encoding scheme and mechanism to access arbi- ASCII markup in an otherwise ordinary .tex source trary ligatures and alternates which may be of use file which can then be used in a prepress ready work- for other projects. flow. History Introduction Zapfino had its origins in Prof. Zapf’s 1944 sketch- Apple’s Mac OS X derives from NeXTstep, by way book, when he was a mapping officer during World of OPENSTEP, with a grafting of Apple Macintosh War II. A previous attempt to render those letter- user interface concepts. In terms of font support, it forms as type, Virtuosa Script for D. Stempel, had handles Mac Resource/Suitcase fonts (both Type 1 been rather compromised by the limitations of hot and TrueType) and PC TrueType fonts, but loses metal matrices, especially the swash letters. This support for Unix .pfa NeXT style .font bundles. design was revived when David Siegel in 1993, after Apple’s QuickDraw/GX is added as well, now known working on the Euler project with Prof. Zapf, and as ATSUI (Apple Typographic System for Unicode after graduating approached him about a chaotic Information) or as AAT (Apple Advanced Typogra- calligraphic typeface based upon an example done phy) depending on the specific context or emphasis for the Society of Typographic Arts in Chicago. Re- desired. membering the page from his sketchbook, Prof. Zapf Mac OS X provides many of its system fonts saw the chance for a design without compromises in the new .dfont format, which, while a straight- forward storing of a Mac-style TrueType font in the 2 file proper (the datafork in Mac parlance) instead of Since then, the open source drawing program Cenon has been released for Mac OS X as well as OPENSTEP 4.2 and the resource fork as was done with Mac OS 9 and GNUstep. It is available from http://www.cenon.info. There earlier, is not equivalent to a PC format TrueType are also SoftMagic’s “Project-M”, Stone Design’s Create or font stored in a .ttf file. Although there are now Purgatory Design’s Intaglio, but none are widely used. 3 Jonathan Kew has since released XeTeX, a successor to programs which can open and parse fonts stored in his T X/GX program for Apple’s QuickDraw/GX, which runs 1 E a .dfont (Pfaedit is a notable example), my inter- on Mac OS X, thus making AAT fonts accessible. It is avail- able from http://scripts.sil.org/xetex. 1 Renamed to FontForge, this wonderful program is avail- able from http://pfaedit.sourceforge.net. 184 TUGboat, Volume 24 (2003), No. 2 due to the advantages afforded by digital type tech- ~/Library/texmf/fonts/ovp/apple/zapfino nology. ~/Library/texmf/fonts/ovf/apple/zapfino Digitization was done by Gino Lee, but pro- ~/Library/texmf/fonts/ofm/apple/zapfino duction halted due to personal problems, and lan- Before testing could begin, it was necessary to guished until Prof. Zapf showed the design to Lino- have the letterforms themselves accessible to output. type. It was then rendered as a traditional, multiple This was done by using Adobe InDesign to typeset alphabet typeface family. an Adobe Tagged Text file which enumerated all of Installation the characters in Zapfino. First, a single character was set in the font Zapfino in InDesign at 72 points This then begs the question of how does one install a size with 96 points leading and then exported (File font into a program (system) which doesn’t have di- | Export. . . , select “Adobe InDesign Tagged Text” rect support for that font format or its capabilities? in the Formats: pop-up), yielding a file with the fol- The solution is quite obvious in retrospect: consider lowing line needed for our purposes: what the system does support (PostScript by way of
checked, the Page Size set to Letter, Orientation to Landscape, Margins and Columns left at their default). After clicking “OK” and getting a new Z document the “A-Master” page icon in the “Pages” palette (Window | Pages) was double-clicked to al- low editing of the master text frame. The master text frame is then selected and set to the coordi- nates X: 43p6, Y: 31p6, W: 39p0 and H: 33p0 us- ing the “Transform” palette (Window | Transform) as shown in Figure 2. The main document is then re- Figure 3:Z turned to by double-clicking on Page 1 in the Pages palette. Clicking with the Text tool in the text block, one then chooses File | Place. . . and navi- page as a .eps. Fortunately, Adobe InDesign affords gates to the Adobe InDesign Tagged Text file cre- a menu option specifically for this, File | Export. . . , ated above and places it in the document so that which includes direct support for the .eps format. it auto-flows to create 1,417 pages with one charac- Choosing “EPS” in the Formats pop-up menu takes ter per page (click on the Master Text Frame while one to a dialogue box where one can select various holding down the
was created which placed a rule on the baseline, the test character and then another rule. \font\zapfino=Zapfino at 24pt \nopagenumbers \overfullrule 0pt \zapfino
\vrule depth 0pt \hskip-.5pt X
\vfill\eject\bye Commands for controlling the position of the char- acter and its size were then added to the .pl file and it was retypeset and adjustments were made until it was correct (see Figure 4). For example, the “IJ” entry looks like the following: (MAP (PUSH) (MOVELEFT R 1.5734) (MOVEDOWN R 1.724) Figure 5: TextEdit.app options for Zapfino in (SPECIAL PSfile=Zapfino-chars_277.eps Mac OS X 10.2 were rather minimalistic hscale=13.28 vscale=13.28) (POP) (MOVERIGHT R .543) ) First the current position is stored (PUSH), then an adjustment is made for the offset of the character face design is well documented in several excellent origin on the .eps file (MOVELEFT) and (MOVEDOWN), references, most notably Stephen Moye’s Fontogra- the character is placed (SPECIAL PSfile=Zapfino- pher: Type by Design and Walter Tracy’s Letters of chars_277.eps, and scaled with hscale and vscale. Credit, both of which are highly recommended to Then the previous position is restored (POP) and the the aspiring type designer (or installer). In short, position advanced to match the CHARWD (MOVERIGHT one sets various “standards” and other characters R .543) (where .543 is the width of the “IJ” char- between them, adjusting the most common and eas- acter). ily spaced characters (“n” and “o”) first, working With all of this done, one can begin testing the toward those which are more difficult and assigning font so as to check the metrics of the characters. A predetermined sidebearings to similar characters (so number of the characters in Zapfino were re-drawn “m” gets the same sidebearings as “n”). Often when between the original Type 1 format and the ver- designing a new typeface, the initial attempt to set sion Apple bundled with Jaguar, so this step could the sidebearings will result in a determination that not be skipped. How to space and test a new type- certain characters must be re-drawn. Naturally that was not at issue here, and with the data gleaned from the .afm files, the metrics quickly reached a usable state. Much hastened in this case since the left sidebearings are preserved in the consistent plac- ing of the characters on the page in the source file, so only the right sidebearings needed to be checked or adjusted. With the base character set available, next the X ligatures and alternates needed to be provided for. Initially, Apple’s options for Zapfino were somewhat limited as is evidenced by TextEdit.app (see Fig- ure 5). WorldText.app, n´ee GX/Write, exposed all of the capabilities encoded within the font, however Figure 4: Final, correct .eps scaling and (see Figure 6), and Apple has since expanded the ns- placement Text object to fully support Zapfino’s myriad capa- TUGboat, Volume 24 (2003), No. 2 187
Za
Figure 7: Za
With all characters assigned to slots, it was then possible to create an Omega Translation Process (OTP) to replace characters with their appropriate Figure 6: WorldText.app, provided in Apple’s ligatures: Developer Tools Samples folder, provides access to input: 1; all of Zapfino’s capabilities output: 2;
states: VERBATIM; bilities.5 Although one may make various menu se- lections, or select characters from a Unicode “Char- expressions: acter Palette” in Cocoa apps, or the Glyph palette ‘0’‘0’ => "{\zapfinoexpert " @"035A"}"; in Adobe InDesign and other Adobe graphics appli- ‘1’‘s’‘t’ => "{\zapfinoexpert " @"0653"}"; cations, these options are not readily available in a ‘2’‘n’‘d’ => "{\zapfinoexpert " @"09A3"}"; text-stream composition-oriented tool like TEX. ‘3’‘r’‘d’ => "{\zapfinoexpert " @"0E23"}"; Further, although OpenType and AAT are able ... to access characters by name, instead of directly ‘C’‘i’‘e’ => "{\zapfinoexpert " @"3504"}"; with a number — and many of the more interesting ‘C’‘o’‘.’ => "{\zapfinoexpert " @"35DA"}"; characters in rich fonts such as Zapfino or Hoefler ‘D’‘r’‘.’ => "{\zapfinoexpert " @"3A3A"}"; Text do not have Unicode code points — TEX and ... its variants (with the exception of the new XeTeX) ‘T’‘h’ => "{\zapfinoexpert " @"78FA"}"; require a number in an encoding vector for any given ... ‘f’‘i’ => "{\zapfinoexpert " @"A91A"}"; character. Toward this end, an encoding scheme %‘f’‘i’ => "{\zapfinoexpert " @"10DD"}";%fi-alt was worked up to allow arbitrary ligatures of up %‘f’‘i’ => "{\zapfinoexpert " @"10DE"}";%fi-swash to three characters in length, and to accommodate ... up to 32 variants for any given (unaccented charac- ‘g’‘g’ => "{\zapfinoexpert " @"ACDA"}"; ter). While that last number may seem overkill, the %‘g’‘g’ => "{\zapfinoexpert " @"ACDB"}";%gg-alt OpenType specification provides for up to 20 vari- ... ations of a character in its salt tag.6 Having 16 ‘u’‘z’ => "{\zapfinoexpert " @"E73A"}"; bits available with Omega, the available bits were ‘w’‘n’ => "{\zapfinoexpert " @"EDBA"}"; split into three sets, an initial set 6 bits long and two successive sets 5 bits long. The first set is long @"F000 =>