Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

TB 77 Adams

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

TUGboat, Volume 24 (2003), No.

2 183
Font Forum
There is no end: Omega and Zapno
William F. Adams
Abstract
The future of type is OpenType (Adobe and Mi-
crosofts successor to Apples Royal font technol-
ogy which was licensed to Microsoft as TrueType),
Unicode, and other extensions of TrueType and the
Type 1 font format such as ATSUI (Apple Typo-
graphic System for Unicode Information). While
T
E
X has been extended to support other new for-
mats and standards such as .pdf, support for the
new font formats has been limited at best.
Fortunately, for Unicode in T
E
X, we have Omega,
which coupled with the other strengths of T
E
X, can
be sucient to take advantage of new technologies
even without explicit support, by using the proper
(or improper) techniques.
This paper will be an explanation and explo-
ration of this, looking at a specic font and format
(the .dfont ATSUI-enabled version of Zapno), ar-
guably very nearly a worst-case scenario, and how
it can be dissassembled into individual glyphs and
seamlessly stitched back together to automatically
insert ligatures and swash and variant forms using
ASCII markup in an otherwise ordinary .tex source
le which can then be used in a prepress ready work-
ow.
Introduction
Apples Mac OS X derives from NeXTstep, by way
of OPENSTEP, with a grafting of Apple Macintosh
user interface concepts. In terms of font support, it
handles Mac Resource/Suitcase fonts (both Type 1
and TrueType) and PC TrueType fonts, but loses
support for Unix .pfa NeXT style .font bundles.
Apples QuickDraw/GX is added as well, now known
as ATSUI (Apple Typographic System for Unicode
Information) or as AAT (Apple Advanced Typogra-
phy) depending on the specic context or emphasis
desired.
Mac OS X provides many of its system fonts
in the new .dfont format, which, while a straight-
forward storing of a Mac-style TrueType font in the
le proper (the datafork in Mac parlance) instead of
the resource fork as was done with Mac OS 9 and
earlier, is not equivalent to a PC format TrueType
font stored in a .ttf le. Although there are now
programs which can open and parse fonts stored in
a .dfont (Pfaedit
1
is a notable example), my inter-
1
Renamed to FontForge, this wonderful program is avail-
able from http://pfaedit.sourceforge.net.
pretation of Apples licensing agreement leads me to
believe that any such parsing or conversion would
not be allowed by that license.
However, having purchased Mac OS X and its
$10,000 worth of fonts, one cannot help but wish
to use them. Although Zapno works well in Co-
coa programs in Mac OS X such as TextEdit.app,
its special features such as ligatures are enabled by
AAT which is unfortunately not supported by the
more traditional Carbon Macintosh applications
in which class all mainstream graphic design appli-
cations are, at this writing.
2
This is unfortunately
quite limiting: either one must limit oneself to Co-
coa applications, or in applications such as InDesign,
make use of its Glyph palette to insert alternates and
ligatures by repetitive pointing-and-clicking. Since
there is no T
E
X variant which can access system
fonts on Mac OS X as of this writing,
3
one must
develop a work-around which allows one to access
arbitrary fonts from within T
E
X and to simulate the
sophisticated typesetting capabilities of OpenType
or Apple Advanced Typography.
The large character sets of fonts such as Ap-
ple Chancery or Zapno make accessing characters
in 8-bit blocks untenable, so Omega is an obvious
choice. This serves two purposes: rst, it makes the
typeface, Zapno by Prof. Hermann Zapf available
for use in T
E
X by way of Omega; second, it provides
an encoding scheme and mechanism to access arbi-
trary ligatures and alternates which may be of use
for other projects.
History
Zapno had its origins in Prof. Zapfs 1944 sketch-
book, when he was a mapping ocer during World
War II. A previous attempt to render those letter-
forms as type, Virtuosa Script for D. Stempel, had
been rather compromised by the limitations of hot
metal matrices, especially the swash letters. This
design was revived when David Siegel in 1993, after
working on the Euler project with Prof. Zapf, and
after graduating approached him about a chaotic
calligraphic typeface based upon an example done
for the Society of Typographic Arts in Chicago. Re-
membering the page from his sketchbook, Prof. Zapf
saw the chance for a design without compromises
2
Since then, the open source drawing program Cenon has
been released for Mac OS X as well as OPENSTEP 4.2 and
GNUstep. It is available from http://www.cenon.info. There
are also SoftMagics Project-M, Stone Designs Create or
Purgatory Designs Intaglio, but none are widely used.
3
Jonathan Kew has since released XeTeX, a successor to
his T
E
X/GX program for Apples QuickDraw/GX, which runs
on Mac OS X, thus making AAT fonts accessible. It is avail-
able from http://scripts.sil.org/xetex.
184 TUGboat, Volume 24 (2003), No. 2
due to the advantages aorded by digital type tech-
nology.
Digitization was done by Gino Lee, but pro-
duction halted due to personal problems, and lan-
guished until Prof. Zapf showed the design to Lino-
type. It was then rendered as a traditional, multiple
alphabet typeface family.
Installation
This then begs the question of how does one install a
font into a program (system) which doesnt have di-
rect support for that font format or its capabilities?
The solution is quite obvious in retrospect: consider
what the system does support (PostScript by way of
dvips and the \special mechanism) and where that
intersects with the capabilities of systems which can
use the font to its fullest (Encapsulated PostScript
File graphics). The solution then is to load all of
the characters of a font into a le so that they may
then each be output as individual .eps les, stitch
said les together as a virtual font and then rely on
dvips to put everything back together.
Zapno, however, has so many characters
(1,417 in the version bundled with Mac OS X 10.2
Jaguar
4
) that Omega, with its support for Uni-
code which provides for large character sets, is
needed. Omega also aords the Omega Transla-
tion Process (OTP), which is far more ecient at
enabling long ligatures than the standard T
E
X or
PostScript mechanisms. Fortunately, odvips sup-
ports the aforementioned special mechanism.
Although font metric information is probably
not protectable, there is no reasonable method at
present to access the data stored within the Zapno
font le which wouldnt run afoul of Apples license
forbidding decompilation or other modication. Pre-
sumably, however, a program using the nsText ob-
ject could access such data on a per character basis
and write that out in a useful format. In lieu of
such, a copy of the .afm les provided by Volker
Schaa (he had received a copy of the original Lino-
type Zapno CD-ROM from Prof. Zapf as a gift)
was used as a beginning point. These les were con-
verted into standard .tfm les using afm2tfm and
thence to .pl les using tftopl. The le for the font
Zapno One served as the basis for zapfino.ovp,
the base font le. The utility ovp2ovf was then
used to create ovf and ofm les for Omega to use.
The les are stored in (as appropriate)
4
Since this writing, Linotype has released Zapno Ex-
tra OpenType which provides even more characters, most
notably small caps, and Forte which provides ve ad-
ditional weights. The technique here should also work
with this new version. More information on Zapno
Extra is available from http://www.linotype.com/1897/
linotypezapfinoextra-folder.html
~/Library/texmf/fonts/ovp/apple/zapfino
~/Library/texmf/fonts/ovf/apple/zapfino
~/Library/texmf/fonts/ofm/apple/zapfino
Before testing could begin, it was necessary to
have the letterforms themselves accessible to output.
This was done by using Adobe InDesign to typeset
an Adobe Tagged Text le which enumerated all of
the characters in Zapno. First, a single character
was set in the font Zapno in InDesign at 72 points
size with 96 points leading and then exported (File
| Export. . . , select Adobe InDesign Tagged Text
in the Formats: pop-up), yielding a le with the fol-
lowing line needed for our purposes:
<cTypeface:><cSize:><cLeading:><cFont:><cHang:>
<pHyphenationLadderLimit:><pHyphenation:>
<pHyphenationZone:><pTabRuler:><ParaStyle:>
<pHyphenationLadderLimit:0><pHyphenation:0>
<pHyphenationZone:0.000000><pTabRuler:
28.000000\,Left\,.\,0\,\;56.000000\,Left\,.\,0
\,\;84.000000\,Left\,.\,0\,\;112.000000\,Left\,.
\,0\,\;140.000000\,Left\,.\,0\,\;168.000000\,
Left\,.\,0\,\;196.000000\,Left\,.\,0\,
\;216.000000\,Left\,.\,0\,\;224.000000\,Left\,.
\,0\,\;252.000000\,Left\,.\,0\,\;280.000000\,
Left\,.\,0\,\;308.000000\,Left\,.\,0\,
\;336.000000\,Left\,.\,0\,\;>
<cTypeface:Regular><cSize:72.000000>
<cLeading:96.000000><cFont:Zapfino>
<cHang:Baseline>A<0xFFFD><cTypeface:>
<cSize:><cLeading:><cFont:><cHang:>
<cSpecialGlyph:><cTypeface:Regular>
<cSize:72.000000><cLeading:96.000000>
<cFont:Zapfino><cHang:Baseline>
<cNextXChars:Page>
(The exported character was A there is some
additional text above and below said line, but it
need merely be preserved in its entirety for later
use.) After a little study and experimentation,
it was found that the placed character could be
replaced with <cSpecialGlyph:####> where ####
was a number ranging from 1 (the rst character,
A shown in the Unicode glyph palette in in Mac
OS X) to 1417 (the last character, the open Ap-
ple symbol), so an Excel le was created with 1,417
rows and three columns. The rst column was ev-
erything before the A endlessly repeated, with
<cSpecialGlyph: added. The second column in-
cremented the current row number starting from 1.
The third column closed out the line, adding a >
to close the cSpecialGlyph directive. This was ex-
ported as text and replaced the line shown above
in the Adobe InDesign Tagged Text le which was
then saved.
Next, a template le was created, as shown in
Figure 1 (File | New | Document. . . , the Facing Pages
checkbox cleared, the one for Master Text Frame
TUGboat, Volume 24 (2003), No. 2 185
checked, the Page Size set to Letter, Orientation
to Landscape, Margins and Columns left at their
default). After clicking OK and getting a new
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-
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-
gates to the Adobe InDesign Tagged Text le cre-
ated above and places it in the document so that
it auto-ows to create 1,417 pages with one charac-
ter per page (click on the Master Text Frame while
holding down the <Shift> key). The le is then
saved as Zapfino-chars in a convenient location.
Figure 1: Adobe InDesign New Document Dialog
Figure 2: Adobe InDesign Transform Palette
settings for master page text frame
Once we have this document with all of the de-
sired characters, it is then a matter of exporting each
Z
Figure 3: Z
page as a .eps. Fortunately, Adobe InDesign aords
a menu option specically for this, File | Export. . . ,
which includes direct support for the .eps format.
Choosing EPS in the Formats pop-up menu takes
one to a dialogue box where one can select various
settings. For the initial font the settings used were:
PostScript: Level 2, Color: Gray, Preview: None, Em-
bed Fonts: Subset, Data Format: ASCII. InDesign
is able to subset fonts in such a way that individ-
ual subsetted fonts may be recombined seamlessly
within a PostScript le or .pdf without any of the
encoding conicts sometimes seen in fonts subset-
ted by Adobe Acrobat or other programs. The Data
Format: must be set to ASCII, since (o)dvips can-
not handle a binary encoded .eps le created in
this fashion. The les are exported to

/Library/
texmf/fonts/eps/Apple/Zapfino for later usage.
Then the .pl le for Zapno-One was used as
a basis for the initial zapfino.ovp Omega Virtual
Font Property List. Notable settings which were
necessary included setting the fonts natural opti-
cal size (DESIGNSIZE R 24). This technique is size-
specic, and a dierent font must be made for each
size which one wishes to typeset at. See the section
Peace below for a work-around for this limitation.
With the character outlines now available, it is
possible to place them within the virtual font us-
ing the special mechanism in odvips. Where each
character has an entry like:
(MAP
(SETCHAR O 353)
)
this is replaced with something like:
(MAP
(SPECIAL PSfile=Zapfino-chars_277.eps)
)
Unfortunately, when this is typeset the character is
not positioned on the baseline, nor is it set to the
correct size. Adjustments for the size and location
of the .eps le placement must be worked out man-
ually. Mostly a matter of trial and error, a test le
186 TUGboat, Volume 24 (2003), No. 2
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 le 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)
(SPECIAL PSfile=Zapfino-chars_277.eps
hscale=13.28 vscale=13.28)
(POP)
(MOVERIGHT R .543)
)
First the current position is stored (PUSH), then an
adjustment is made for the oset of the character
origin on the .eps le (MOVELEFT) and (MOVEDOWN),
the character is placed (SPECIAL PSfile=Zapfino-
chars_277.eps, and scaled with hscale and vscale.
Then the previous position is restored (POP) and the
position advanced to match the CHARWD (MOVERIGHT
R .543) (where .543 is the width of the IJ char-
acter).
With all of this done, one can begin testing the
font so as to check the metrics of the characters. A
number of the characters in Zapno were re-drawn
between the original Type 1 format and the ver-
sion Apple bundled with Jaguar, so this step could
not be skipped. How to space and test a new type-
X
Figure 4: Final, correct .eps scaling and
placement
Figure 5: TextEdit.app options for Zapno in
Mac OS X 10.2 were rather minimalistic
face design is well documented in several excellent
references, most notably Stephen Moyes Fontogra-
pher: Type by Design and Walter Tracys Letters of
Credit, both of which are highly recommended to
the aspiring type designer (or installer). In short,
one sets various standards and other characters
between them, adjusting the most common and eas-
ily spaced characters (n and o) rst, working
toward those which are more dicult and assigning
predetermined sidebearings to similar characters (so
m gets the same sidebearings as n). Often when
designing a new typeface, the initial attempt to set
the sidebearings will result in a determination that
certain characters must be re-drawn. Naturally that
was not at issue here, and with the data gleaned
from the .afm les, 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 le,
so only the right sidebearings needed to be checked
or adjusted.
With the base character set available, next the
ligatures and alternates needed to be provided for.
Initially, Apples options for Zapno were somewhat
limited as is evidenced by TextEdit.app (see Fig-
ure 5). WorldText.app, nee GX/Write, exposed all
of the capabilities encoded within the font, however
(see Figure 6), and Apple has since expanded the ns-
Text object to fully support Zapnos myriad capa-
TUGboat, Volume 24 (2003), No. 2 187
Figure 6: WorldText.app, provided in Apples
Developer Tools Samples folder, provides access to
all of Zapnos capabilities
bilities.
5
Although one may make various menu se-
lections, or select characters from a Unicode Char-
acter Palette in Cocoa apps, or the Glyph palette
in Adobe InDesign and other Adobe graphics appli-
cations, these options are not readily available in a
text-stream composition-oriented tool like T
E
X.
Further, although OpenType and AAT are able
to access characters by name, instead of directly
with a number and many of the more interesting
characters in rich fonts such as Zapno or Hoeer
Text do not have Unicode code points T
E
X and
its variants (with the exception of the new XeTeX)
require a number in an encoding vector for any given
character. Toward this end, an encoding scheme
was worked up to allow arbitrary ligatures of up
to three characters in length, and to accommodate
up to 32 variants for any given (unaccented charac-
ter). While that last number may seem overkill, the
OpenType specication provides for up to 20 vari-
ations of a character in its salt tag.
6
Having 16
bits available with Omega, the available bits were
split into three sets, an initial set 6 bits long and
two successive sets 5 bits long. The rst set is long
enough to encompass basic Latin capitals and mi-
nuscule (lowercase) letters as well as the numerals 0
through 9, with two bits left over. One of these was
used as a swash bit, while the other remains avail-
able for use. The second and third sets encompass
lowercase letters.
5
See Panthers Major Text Services Upgrade,
http://www.codepoetry.net/archives/2003/10/24/
panthers major text services upgrade.php
6
See Tag: salt in http://partners.adobe.com/asn/
tech/type/opentype/appendices/features pt.jsp
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
ligatures:
input: 1;
output: 2;
states: VERBATIM;
expressions:
00 => "{\zapfinoexpert " @"035A"}";
1st => "{\zapfinoexpert " @"0653"}";
2nd => "{\zapfinoexpert " @"09A3"}";
3rd => "{\zapfinoexpert " @"0E23"}";
...
Cie => "{\zapfinoexpert " @"3504"}";
Co. => "{\zapfinoexpert " @"35DA"}";
Dr. => "{\zapfinoexpert " @"3A3A"}";
...
Th => "{\zapfinoexpert " @"78FA"}";
...
fi => "{\zapfinoexpert " @"A91A"}";
%fi => "{\zapfinoexpert " @"10DD"}";%fi-alt
%fi => "{\zapfinoexpert " @"10DE"}";%fi-swash
...
gg => "{\zapfinoexpert " @"ACDA"}";
%gg => "{\zapfinoexpert " @"ACDB"}";%gg-alt
...
uz => "{\zapfinoexpert " @"E73A"}";
wn => "{\zapfinoexpert " @"EDBA"}";
@"F000 => <push: VERBATIM> ;
<VERBATIM>@"0021-@"007F => #(\1 + @"F000) ;
<VERBATIM>@"F001 => <pop:> ;
. => \1;
The Omega documentation
7
explains OTPs in de-
tail. Each line in an OTP to handle a particular
7
Draft documentation for the Omega system (John
Plaice and Yannis Haralambous, 7 March 1998, avail-
able from http://www.loria.fr/services/tex/moteurs/
omega7mar1998.pdf
188 TUGboat, Volume 24 (2003), No. 2
case is fairly straightforward. First the characters to
be replaced are identied (the => indicates a replace-
ment is being made), then a verbatim sequence of re-
placement commands is given within quotes, with a
characters encoding being provided in an escaped
fashion outside of the quotes (hence, ^^^^035a is
"035A). This was saved in a le lat2zapf.otp and
processed with the command
otp2ocp lat2zapf.otp lat2zapf
and the les moved to

/Library/texmf/omega/
otp and

/Library/texmf/omega/ocp respectively.
A number of font transformations normally han-
dled with ligatures are transferred to the OTP. Al-
though not shown, em and en dashes are created in
the OTP, as are smart quotes. Similarly, the stan-
dard ligatures , , and are handled in the OTP
(there is no ). There are several reasons for this:
conformance with other Omega fonts, to preclude
ligature formation interfering with contextual pro-
cessing of alternates, eciency (OTPs can process a
single string of arbitrary length, but T
E
Xs ligature
mechanism requires sequential processing of all iter-
ations leading up to the nal form; see below) and
the small matter of Omega crashing when forming
a ligature past the 8-bit point.
partial listing of cmr10.pl
(LIGTABLE
...
(LABEL C f)
...
(LIG C f O 13)
...
(STOP)
(LABEL O 13)
(LIG C i O 16)
...
Note that there were several ligatures which
were commented out with %, alternate or swash forms.
01 2 3 4 56 7890
C. CDEHJLMSulivan MMMMMN
S S S SS
Torn dcot daw preag fe type aanced eect t uent af eg itmus
ot Zap pone hapy Aral ar mes sel mas say t mate srt uo ow
Figure 8: Initial test output
It was then possible to test the font for the rst
time with a (Plain) T
E
X le like:
\font\zapfino=Zapfino at 24pt
\font\zapfinoexpert=Zapfino-expert at 24pt
\ocp\zapfOCP=lat2zapf
\ocplist\zapfOCPlist=%
\addbeforeocplist 1 \zapfOCP
\nullocplist
\nopagenumbers
\overfullrule 0pt
\zapfino\pushocplist \zapfOCPlist
00 1st 2nd 3rd 4th 5th
6th 7th 8th 9th 10th
Cie. Co. Dr. Esq. Ht. Jr. Ltd. McSullivan
Mlle. Mme. Mr. Mrs. Ms. No. 9 Sig. Sr.
Sra. Srta. St.
Thorn dicot draw presage fez type. affianced
effect fit fluent aft egg isthmus out
Zapf phone happy Arial art mesh spell
mass stay the matte spritz uzo own
\vfill\eject\bye
which shows all of the ligatures, as well as point-
ing out that perhaps using old-style gures as the
default wasnt such a great idea, at least not if one
intends to use the 0th ordinal ligature.
Once the basic sidebearings of the font were set
and the ligatures wired up, the interplay of spe-
cic letterpairs needs to be addressedthe graph-
ical interface which Mac OS X provides for Zapno
provides some hints on this, most notably, Avoid d
collisions. As one can see in gure 9, the standard,
forward slanting lowercase d in Zapno collides with
the preceding character quite often, especially when
preceded by a capital letter. Figure 8 also hints
at awkward character interactions such as the near-
intersection of ppy.
TUGboat, Volume 24 (2003), No. 2 189
Id, Nd, Ud, Wd, Yd
bd, fd, hd, kd, ld
Id, Nd, Ud, Wd, Yd
bd, fd, hd, kd, ld
Figure 9: In Zapno, ds collide
While one is tempted to merely set the second
style of d described in the font le, or Linotypes
Adobe Type 1 version of Zapno as d.2,
8
this brings
to light an excellent chance to add some chaos to
the typeface and pick dierent character versions.
The overall intent is to create a system which
will make use of all possible characters in some cir-
cumstance, and a collection of test les which will
test all such circumstances. While one is tempted
to just x all such occurrences, this leads to un-
necessary processing eort. Instead, a listing of all
possible digraphs (letterpairs) in the English lan-
guage was created (drawing from Websters Dictio-
nary, The Complete Works of Shakespeare and The
King James Bible NeXT users will recognize the
choice of references as those bundled with NeXTstep
or readily available as texts for NeXTs Digital Li-
brarian program), so that it was possible to deter-
mine that only Id, Nd, Ud, Wd, and Yd needed to be
considered for the capitals (thus saving by not cre-
ating entries for Fd, Hd, Jd, Kd, Td, Vd, Xd, and Zd
which do not occur in the English language sample
set used). The following lines in the OTP prevent
such collisions by replacing the normal d with the
d.2 alternate.
Id => "I{\zapfinoexpert " @"FC62"}";
Nd => "N{\zapfinoexpert " @"FC62"}";
Ud => "U{\zapfinoexpert " @"FC62"}";
Wd => "W{\zapfinoexpert " @"FC62"}";
Yd => "Y{\zapfinoexpert " @"FC62"}";
With the obvious change taken care of, more
subtle changes were then considered. Working from
the most frequently occurring letters to the rarer
8
Apparently, this route was taken by Apple and Linotype
in the implementation in Mac OS X 10.3 Panther.
Zap
Figure 10: Zap
ones, a le for each letter, containing a word for each
letterpair extant in the sample texts was typeset in
the font Zapno and then examined carefully for
awkward interactions. When one was found, a test
le was typeset with a basic macro to set the word
with all possible variations for a given letter:
\def\testa#1#2#3{{#1}{#2}{#3}\par% a
{#1}{\zapfinoexpert ^^^^fc02}{#3}\par%
{#1}{\zapfinoexpert ^^^^fc03}{#3}\par%
{#1}{\zapfinoexpert ^^^^fc04}{#3}\par%
{#1}{\zapfinoexpert ^^^^fc05}{#3}\par%
{#1}{\zapfinoexpert ^^^^fc06}{#3}\par%
}
allowing the selection of the best choice.
The normal usage was to set the text to be
tested without any special treatment, and then to
insert the macro into the text so as to call out alter-
nates.
...
halfcock
\testf{hal}{f}{cock}
...
Twenty-six such macros were created, and a second
set with only two arguments was also made for the
capitals. Often it was necessary to test the charac-
ters before or after as well.
halfcock
halfcock
halfcock halfcock halfcock halfcock
Figure 11: Test macro output
190 TUGboat, Volume 24 (2003), No. 2
Zapf
Figure 12: Zapf without the pf ligature
The pair nf and a number of other pairs ending
in f did not work well because the f in Zapno One
does not connect to the character before it, so a
number of lines similar to the following were added
to the OTP to handle such cases:
nf => "n{\zapfinoexpert " @"FCA4"}";
of => "{\zapfinoexpert " @"FDC2 @"FCA4"}";
if => "i{\zapfinoexpert " @"FCA4"}";
ij => "i{\zapfinoexpert " @"FD24"}";
Examining that le will show the reader which char-
acter pairs were felt to require adjustment. For the
most part, replacing one character or the other (oc-
casionally both) with an alternate provided an s-
thetically pleasing combination, though a few un-
common pairs (gj, Kz ) did not yield such.
Interestingly, the gj pair actually convinced me
to revisit an initial decision to set the normal j (from
the font Zapno One) only at the end of characters,
instead choosing it as the only appropriate form to
use after a g.
Zapnos many lowercase ligatures required
that the list of digraphs be extended to encom-
pass the trigraphs and tetragraphs which encom-
pass these lettersets in addition to the digraphs men-
tioned above. For each such letter or ligature there
is a le (e.g., di-.txt which is shown next), which
encompasses the extant lettersets including said let-
ter or ligatures letters with the hyphen indicating
the location of the letters being checked for, so that
infamy infamy
logjam
Kzyl-Orda
logjam
Kzyl-Orda
Figure 13: Alternate treatments
cauldron
gilding
cauldon
gildng
Figure 14: Ligatures required examination of
trigraphs and tetragraphs
le ranges from Diagram through dizzy. Since
the di and dr ligatures do not reach as far to the
left, most such letterpairs were acceptable. Notable
exceptions were ldr and ldi which were set to
make use of the alternate character l.4 as shown in
Figure 14.
Diagram diagram
Dibs dibs
Dice dice
Did did
Died died
Different different
Dig dig
Dihedron dihedron
Diiodemethane diiodemethane
Dijon Jehudijah
Dikdik dikdik
Dill dill
Dim dim
Din din
Diode diode
Dip dip
Diquat diquat
Dire dire
Distill distill
Ditto ditto
Diurnal diurnal
Divine divine
Diwali diwan
Dixie dixie
Diyarbakir
Dizzy dizzy
One hundred and fourteen such les were created.
Usage with a leading capital is shown rst if possible,
followed by lower-case usage, again, if possible (diy
apparently is only possible when capitalized as in
Diyarbakir). If only lowercase usage is possible (not
shown above) that line is indented by a space.
Zapno is so narrow, however, with such a low
x-height, and such large ascenders, that it is actu-
ally possible for the ascender on a d to collide with a
character two characters before it as in, led. Thus
a set of test les encompassing all characters with
ascenders followed by any letter, followed by a d
was created. Unfortunately, it is also possible for a
TUGboat, Volume 24 (2003), No. 2 191
d at the beginning of a word to clash with the pre-
vious word if it ends with an ascender. Suggestions
for dealing with this situation would be welcome.
9
Doubled characters required special attention
if there is no ligature for them, requiring that one
check to determine which letter versions look attrac-
tive together.
After all such les were typeset and examined
twice (once to establish the initial replacements, a
second time to check for interactions between the
replacements and characters which follow or pre-
cede them) it was possible to begin using Zapno
in Omega. The rst such usage was for a holiday
card as discussed in the section Peace.
Swash markup
That initial usage did not however, allow for user-
level control of individual characters. One could
of course use direct access with constructs such as
{\zapfinoexpert\char^^^^2804}, but thats not
exactly user-friendly (or even mnemonic). Although
the use of swash alternates has been considered for
Omega before,
10
and Alan Hoenig has considered
macro-based schemes,
11
there exists no generally ac-
cepted system for indicating swashness in running
text. The following version of a markup scheme
for accessing arbitrary alternates and swashes is an
experimental interface to determine how well this
could be done using just an OTP.
The swash OTP uses the following options:
+----a (rst level alternate)
+-----a (second)
+------a (third)
+-------a (fourth)
...
a----+ (rst level alternate at the end)
a-----+ (second level alternate)
&c.
As always, the best laid plans ran into problems
of implementation. The original intent was to add
additional +s instead of continuing to add -s, but
this became infeasible when a limit in the number
of instructions (10,000) in a given state in an OTP
was reached.
12
9
This is probably why Apple and Linotype chose to
change the default d as noted in footnote number 8.
10
Yannis Haralambous and John Plaice, First applica-
tions of : Adobe Poetica, Arabic, Greek, Khmer. TUG-
boat 15(3), 1994.
11
Alan Hoenig, The Poetica family: Fancy fonts with
T
E
X and L
A
T
E
X. TUGboat 16(3), 1995.
12
My thanks to Giuseppe Bilotta for his patience and tech-
nical acumen, not merely determining the nature of the dif-
culty, but also providing a sample le showing how to work
around it.
Zap
Figure 15: Zapf with the pf ligature
Before adding swash variations, here is a text
using a modest set of alternates and most ligatures:
Always srve to find
some intereting varation.
At the rst level of ornamentation, which would
be indicated as follows:
+-----Always strive to find-----+
+-----some interesting variation-----+
it appears thus:
Always srve to find
some intereting varation
Continuing, the process yields:
Always srve to find
some intereting varation
or even:
Always srve to find
some intereting varation
Adding and subtracting hyphens, one might -
nally arrive at:
Always srve to find
some intereting varation
Left unaddressed is the matter of arbitrary
swash variants in the middle of a text. Either of
the above schemes can be used within a word, but
interferes with spell-checking.
192 TUGboat, Volume 24 (2003), No. 2
Ti card was typeet
using t Omega varant of D Donald Knuts T
E
X sysem
created by Yanni Haralambos and John Plaice
in t typeface Z created by Prof. Hermann Zap
wit David Siegl and Gino Lee
It i modeled on Jean-Yee Wongs
famos polyglot card for UNICEF.
Te French translation was provided by Jef Tombeur,
t tradtional German, also used for Hndels Mesiah, by David Kasrup,
t Latin by DK , Bruno Voiin and John MCheney-Yong
t Dutch by Henk Gianoten, t Frysian by Gerben Wierda,
t Sweds by Fredik Walenberg,
t Finnih by Pekka Sorjonen,
t Italian by Giusepe Bilota,
t Spanih by Jorg de Buen U.
t Portuguee by Jorg N. R. Vilhena,
and t Danih by Mogens Lemvig Hansen.
Translations for oter languages wold be gratefuly received.
Created by Wiliam F. Adams for t T
E
X Showcase
Figure 16: Peace on Earth card back page
TUGboat, Volume 24 (2003), No. 2 193
Peace on Eart
Good Wil Toward Men
Figure 17: Peace on Earth interior
Peace
The rst use of this Zapno install in Omega was
to set a holiday card modelled on Jeanyee Wongs
famous polyglot card for UNICEF.
13
After this was
initially set, it was announced on Usenet and vari-
ous mailing lists related to T
E
X or typography in the
hope of readers providing additional translations.
Jef Tombeur and Apostolos Syropoulos were kind
enough to provide translations for French and Greek
respectively (though since Zapno doesnt contain a
full Greek alphabet the latter was provided typeset
in the Kerkis font), and a revised version was made
available as a part of the T
E
X Showcase.
14
In the course of preparing this paper, a sec-
ond, more successful, announcement and request for
translations was made, with many people provid-
ing translations and commentary (I had neglected
to mention the text, Peace on earth, good will to-
ward men as being the latter part of the verse Luke
2:14 from The King James Bible, so in addition to
straightforward transcriptions from various Bibles, I
also received a number of personal interpretations
this verse is also quite controversial due to varying
transcriptions of the original Greek text and subse-
quent emendations by various scribes) resulting in
an expansion of the card to three pages, almost a
dozen languages (Greek has been temporarily omit-
ted) and twenty names.
Once typeset as a three page .pdf, the rst and
last pages (which were not lled completely) were
cropped, then each page was exported as a .eps
and imposed in Macromedia FreeHand where each
was scaled appropriately to t nicely on a tabloid or
A3 sheet which could then be folded twice to make
a gatefold card. This aords the illusion of having
three dierent sizes of Zapno available, despite only
one font at a xed size (24 pt.) having been made.
13
Exhibit 214. UNICEF Christmas Card. Jeanyee Wong.
1962. Two Thousand Years of Calligraphy: A Three-part
exhibition organized by the Baltimore Museum of Art, the
Peabody Institute Library and the Walters Art Gallery, June
6July 18, 1965, A Comprehensive Catalog: Baltimore,
Maryland, 1965.
14
http://www.tug.org/texshowcase
Zapi
Figure 18: Zap
Paix sur terre
Bonne entente entre tote et tos
F rede auf Erden
und den Menschen ein Wohlgfalen
In terra pax
hominibus bon voluntati
Vrede op aarde
aan de mensen van goede wil
Frede op ierde
nder minsken fen it wolbehagen
F rd p jorden,
til mnnikorna et got behag
Rauha Maasa
Ja Ihmiil Hyv Tahto
Pace in terra
agli uomini d buona volont
Paz en la tierra
a los hombre de buena voluntad
Paz na terra
entre os homens de boa vontade
Fred til menneker
med Guds velbehag!
Figure 19: Peace on Earth card front page text
194 TUGboat, Volume 24 (2003), No. 2
Te Duck &t Mose
by Jesica Adams
One day in June a *DUCK* and a *MOUSE* were walking in a field when
t *DUCK* saw a *TULIP*. Te *DUCK* said, Look at t prety
litle red ower.
Ye its very prety, but look... said t *MOUSE*.
What? asked t *DUCK*.
What i ti funny long rond ting? asked t *MOUSE* dging in t
leave beneat t *TULIP*. Its very prety too.
Its a people ting, a *PEN*. answered t *DUCK*.
I wonder why its here? asked t *MOUSE* as it puled t *PEN* ot
onto t pat.
Shhh! Liten! whipered t *DUCK*.
Humans! Hide! hised t *MOUSE*, and t two hid behind t
*TULIP*.
Dont worry, teyre childen. said t *DUCK*.
Te big girl human asked, Whyd yo take my good *PEN*, Charlie?"
But Lizzie, I ddnt mean to lose it!
Look my *PEN*! soted t girl as se picked up her *PEN* from t
grond where t *MOUSE* had doped it.
Te *DUCK* and t *MOUSE* breated a sigh of relief and togeter tey
walked into t sunset.
Te End.
Figure 20: A childs story
TUGboat, Volume 24 (2003), No. 2 195
\font\zapfino=Zapfino at 24pt
\font\zapfinoexpert=Zapfino-expert at 24pt
\ocp\zapfOCP=lat2zapf
\ocp\swashOCP=sws4zapf
%uncomment the rebusocp lines for pictures
%rebus\ocp\rebusOCP=rbs4zapf
\ocplist\zapfOCPlist=%
\addbeforeocplist 1 \zapfOCP
\addbeforeocplist 1 \swashOCP
%rebus\addbeforeocplist 1 \rebusOCP
\nullocplist
\nopagenumbers\overfullrule 0pt
\zapfino\pushocplist \zapfOCPlist
The +------D\kern2ptuck (-------ET{}
the +------Mouse \smallskip
by +------Jessica +-----Adams
\smallskip
One day in June a *DUCK* and a *MOUSE*
were walking in a field when the *DUCK*
saw a *TULIP*. The *DUCK* said,
Look at the pretty little red flower.
Yes its very pretty, but look...
said the *MOUSE*.
What? asked the *DUCK*.
What is this funny long round thing?
asked the *MOUSE*, digging in the leaves
beneath the *TULIP*. Its very pretty too.
Its a people thing, a *PEN*.
answered the *DUCK*.
I wonder why its here? asked the *MOUSE*
as it pulled the *PEN* out onto the path.
Shhh! Listen! whispered the *DUCK*.
Humans! Hide! hissed the *MOUSE*,
and the two hid behind the *TULIP*.
Dont worry, theyre children.
said the *DUCK*.
The big girl human asked,
Whyd you take my good *PEN*, Charlie?"
But Lizzie, I didnt mean to lose it!
Look, my *PEN*! shouted the girl
as she picked up her *PEN* from the ground
where the *MOUSE* had dropped it.
The *DUCK* and the *MOUSE*
breathed a sigh of relief and together they
walked into the sunset.
The End.\vfill\eject\bye
Zapin
Figure 21: Zapn
And pictures too
In addition to alternates and ligatures, Zapno also
has a number of ornaments available. Typically, ac-
cess to such ornaments in T
E
X has been rather pro-
saically done using a macro which calls a particu-
lar ornament by its number. Although serviceable,
this requires the user to have access to a chart which
matches things up, and is not well-suited to usage in
running text, or to easy typing or proong. Oddly,
although Helvetica seems to have a Rebus option
in Mac OS X 10.3 Panther, this does not seem to
have been implemented for Zapno, reducing one
to point-and-clicking to access them from a glyph
palette of some sort. Since thats not an option for
normal T
E
X usage, an alternative scheme needed to
be worked up.
Drawing upon the Rebus option for inspira-
tion, a descriptive text was matched up for each or-
nament, and a new OTP was created to allow said
text, set in all caps and surrounded by asterisks
(e.g., *PEN*) to be replaced by the appropriate or-
nament when the OTP is loaded.
I prevailed upon my daughter to write a story
making use of animals and things represented as or-
naments in the Zapno font. A typical setting of
the story for proofreading purposes is shown on the
facing page. The source text is shown to the left.
Some of the ornaments available with Zapno
include:
________@%
Figure 22: Ornaments
Lastly, the story with appropriate words re-
placed with ornaments from Zapno (a rebus text)
is shown on the following page in Figure 23.
Unfortunately, as noted above, the ornaments
are numbered, not given descriptive labels. While
some of them are obvious, others are less so. Sug-
gestions on tags for unnamed ornaments would be
welcome.
196 TUGboat, Volume 24 (2003), No. 2
Te Duck &t Mose
by Jesica Adams
One day in June a and a were walking in a field when t saw a
. Te said, Look at t prety litle red ower.
Ye its very prety, but look... said t .
What? asked t .
What i ti funny long rond ting? asked t dging in t leave
beneat t . Its very prety too.
Its a people ting, a . answered t .
I wonder why its here? asked t as it puled t ot onto t pat.
Shhh! Liten! whipered t .
Humans! Hide! hised t , and t two hid behind t .
Dont worry, teyre childen. said t .
Te big girl human asked, Whyd yo take my good , Charlie?"
But Lizzie, I ddnt mean to lose it!
Look my ! soted t girl as se picked up her from t grond where
t had doped it.
Te and t breated a sigh of relief and togeter tey walked into t
sunset.
Te End.
Figure 23: A childs picture story
TUGboat, Volume 24 (2003), No. 2 197
Zapino
Figure 24: Zapno without full ligation
Overview
Thus is it shown that with a complete disregard for
eciency, storage space and processing time, one
can access any font from within T
E
X so long as it
is supported on a platform whose capabilities some-
where intersect those utilities and variations which
have grown up around T
E
X. This technique is com-
pletely platform agnostic after the initial stage, and
if one foregoes the best font handling, can be done
with bundled and free software, without recourse to
commercial applications such as Adobe Acrobat.
Take an application which can access all of the
characters in the OpenType or AAT/ATSUI font to
typeset every character one wants to get at as a
document, convert each page into .eps les, then
create a virtual font which places the appropriate
.eps le for a given letter, which is then used to
typeset a PostScript le which places each character
as necessary. When the resulting le is distilled with
Adobe Acrobat Distiller the subsetted fonts in the
.eps les are transparently stitched back together in
a fashion which any reasonably capable PostScript
interpreter or PDF viewing program can handle.
Advantages The good things about this technique
include:
No font conversion necessary
No issues with licensing (Apples software li-
cense forbids derivative products, so one may
not convert or decompile typefaces covered by
Apples licensing agreements Apple has even
been stripping out tables to cripple their fonts
so they wont work on other platforms if con-
version is attempted)
One can get at all 1,400+ characters in Zapno
without re-encoding or using awkward macros
or active characters.
Version invariant already there have been four
distinct versions of Zapno, and little provision
for backwards compatibility has been made.
Z
Figure 25: Zapno
One is not limited to the normal T
E
X color
models, but may use anything which InDesign
has access to, including spot colors.
Disadvantages As alluded to above, this technique
does have a number of drawbacks:
Must make and store the individual .eps les
(hundreds of megabytes, requires commercial
software for the best results).
Large le sizes (tens of megabytes for a single
lengthy sentence an attempt to create a com-
plete sample of all digraphs and trigraphs ran
into the Windows 9x le size limit of 512MB).
Processing time (distill times in the tens of sec-
onds for a couple of sentences, generating the
.ps le with odvips takes even longer).
Future developments The following things remain
to be done for this particular technique for accessing
Zapno:
The base font needs to be lled in beyond just
ISO Latin 1 so as to provide the balance of the
Unicode-encoded characters available in Zapno.
This would be much easier if utilities such as
afm2tfm and fontinst would completely support
character sets larger than 8 bits.
Similarly, most accented letters have swash vari-
ants, but the encoding scheme worked up for
handling swashes and ligatures doesnt encom-
pass such. Suggestions for a solution for this
would be welcome.
The text test set should be enlarged to encom-
pass all possible trigraphs or even tetragraphs,
and the OTP adjusted to at once increase ran-
domness, and also reduce the incidence of cer-
tain characters which have a stronger presence
than might be desireable.
A L
A
T
E
X2

package should be put together to


move usage out of the realm of hackery and into
more mainstream production.
Examine usage with Mac OS X Panther.
198 TUGboat, Volume 24 (2003), No. 2
The X Factor
Since this presentation was made, Jonathan Kew
has released XeTeX, the successor to T
E
X/GX, a
T
E
X-variant which made use of QuickDraw/GX,
from which Apple Advanced Typography is derived.
Rapidly improving, it is well suited to personal use,
or production use in an up-to-date production envi-
ronment which is not hobbled by a need for back-
wards compatibility with older PostScript RIPs or
other software.
It is especially well suited for use with languages
which use character sets other than those based on
Latin (which is its main focus).
By way of comparison, here is the source code
for the Apple acknowledgement/Thank You which
appeared in the TUG2003 proceedings:
%&personaltex
%
%Copied from the XeTeX example file XeTeX-notes.tex
\font\tx="Hoefler Text:Number Case=Upper Case Numbers" at 12pt
\font\txsmall="Hoefler Text:Number Case=Upper Case Numbers" at 11pt
\font\sc="Hoefler Text:Letter Case=Small Caps" at 11pt
\font\it="Hoefler Text Italic" at 12pt
\font\mt="Hoefler Text Black" at 16pt
\font\sh="Hoefler Text Black" at 12pt
\font\tt="Courier" at 11pt
\font\lg="Lucida Grande" at 11pt
\font\lgb="Lucida Grande Bold" at 16pt
\def\LaTeX{\leavevmode L\kern-.25em\raise.5ex\hbox{\sc a}\kern-.1em\TeX}
\def\XeTeX{\leavevmode
\setbox0=\hbox{\lg X\lower.5ex\hbox{\kern-.1667em }\kern-.15em \TeX}%
\dp0=0pt\ht0=0pt\box0 }
\def\mtXeTeX{\leavevmode
\setbox0=\hbox{\lgb X\lower.5ex\hbox{\kern-.1667em }\kern-.15em \TeX}%
\dp0=0pt\ht0=0pt\box0 }
\def\TeXgX{\TeX\lower.5ex\hbox{\kern-.15em G}\kern-.25em X}
% dont like how the hyphen in Hoefler appears, so we hack it:
\catcode\-=\active \def-{\lower.2ex\hbox{\char\-}\penalty0 }
%Copied from the XeTeX example file story-zapfino.tex
\font\zapfinoreg="Zapfino" at 14pt
\font\zapfinofirst="Zapfino:Stylistic Variants=First variant glyph set" at 14pt
\font\zapfinosecond="Zapfino:Stylistic Variants=Second variant glyph set" at 14pt
%Copied from the XeTeX example file FontSamples.tex
\frenchspacing % often works better with XeTeX
\baselineskip16pt
\parindent0pt
\parskip\medskipamount
\nopagenumbers
\font\1="Hoefler Text Italic:Letter Case=Small Caps" at 12pt
\font\1="Hoefler Text Italic" at 12pt
The T
E
X Users Group gratefully acknowledges Apple Computers generous contributions,
especially to the Praical T
E
X 2004 and TUG2003 Conferences.
Tank yo.
The Apple Store in San Francisco is located at One Stockton Street, San Francisco, CA 94108
(This was typeset with the TLX variant XTEX createu by ]onathan Kew using the Apple System Ionts
Hovrrvv Tvx1 by Jonathan Hoeer, Zavro by Hermann Zapf and Sxa by Matthew Carter.
http://www.apple.com/retail/sanfrancisco http://scripts.sil.org/xetex
1
2
1 2
Figure 26: Thanking Apple
TUGboat, Volume 24 (2003), No. 2 199
A note about Figures 3, 7, 10, 12 15, 18, 21,
24, 25 and 27
After my presentation in Hawaii, Barbara Beeton
specically asked that I include an animation of the
sequence of typing Zapno, the contextual replace-
ment of letters with the appropriate ligatures in the
on-line version. Due to time constraints, I did not
manage to do so. However, creating animated .gifs
has always reminded me of study hall in my younger
school days and doodling little gures in the margins
of notebooks and pads, and of a Warner-Brothers
book I had as a child which featured Wile E. Coy-
ote and the Roadrunner of cartoon fame with such
a sequence in its margin. I believe this is the rst
TUGboat article to include a ipbook (the gures
in the upper right-hand corner of the recto pages).
If present, a matching gure on the upper left of
a page shows one what the text looks like without
ligatures.
\font\italt="Hoefler Text Italic:Ligatures=Rare Ligatures,Diphthongs;
Smart Swashes=Archaic Long s Swash;
Character Alternatives=Swash Caps"
at 12pt
\font\sr="Skia Regular" at 11pt
\font\1="Skia Regular:width=1.25" at 12pt
\font\1="Skia Regular:width=0.8" at 12pt
\font\1="Skia Regular:width=0.8;weight=1.5" at 12pt
\font\1="Skia Regular:width=0.8;weight=2.5;Number Case=Upper Case Numbers" at 12pt
\font\1="Skia Regular:width=0.8;weight=0.6;Ligatures=Rare Ligatures" at 12pt
\font\1="Skia Regular" at 18pt
\tx%
The \TeX\ Users Group gratefully acknowledges Apple Computers generous contributions,
especially to the {\italt Practical \TeX\ 2004}
and {\italt TUG 2003} Conferences.
\bigskip
\hfill{\zapfinosecond Thank you.}
\bigskip \strut \bigskip
\centerline{\sr The Apple Store in San Francisco is located at One Stockton Street,
San Francisco, CA 94108$^1$}
\medskip
\centerline{\txsmall (This was typeset with the \TeX\ variant \XeTeX$^2$ created by Jonathan Kew
using the Apple System fonts}
\smallskip
\centerline{{\sc Hoefler Text} by Jonathan Hoefler, {\sc Zapfino} by %Prof.
Hermann Zapf and {\sc Skia} by Matthew Carter.)}
\smallskip
\centerline{$^1$\tt http://www.apple.com/retail/sanfrancisco ~ $^2$http://scripts.sil.org/xetex}
\vfill\eject\bye

Figure 27: Zapno ornament


William F. Adams
ATLIS Graphics
75 Utley Drive, Suite 110
Camp Hill, PA 17011
USA
willadams@aol.com
Of the making of books, there is no end.
The Prophet Muhammad

You might also like