The Apple Font Tool Suite
Total Page:16
File Type:pdf, Size:1020Kb
The Apple Font Tool Suite This document is copyright © 2002 by Apple Computer, Inc. All rights reserved. Table of Contents Table of Contents........................................................................................................................i Introduction...............................................................................................................................v Installing the tools.................................................................................................................vi Words of warning .................................................................................................................vi Using the tools ......................................................................................................................vi ftxanalyzer .................................................................................................................................1 Typical uses for ftxanalyzer ...................................................................................................3 ftxdiff .........................................................................................................................................5 ftxdumperfuser ..........................................................................................................................7 ftxenhancer ..............................................................................................................................11 ftxinstalledfonts........................................................................................................................13 ftxruler .....................................................................................................................................15 ftxvalidator...............................................................................................................................19 How to Use Add Lists .............................................................................................................23 Introduction .........................................................................................................................23 Creating an Add List............................................................................................................23 The first line.........................................................................................................................23 The component line(s) .........................................................................................................24 Some examples.....................................................................................................................26 Roman numerals ..................................................................................................................27 Accented glyphs ...................................................................................................................27 More extreme examples .......................................................................................................28 About Morph Input Files.........................................................................................................29 Introduction .........................................................................................................................29 i A Quick Review of AAT Metamorphosis Effects................................................................29 A First Example...................................................................................................................30 Some general MIF rules.......................................................................................................31 MIF Format—Headers........................................................................................................32 MIF Format—Noncontextual .............................................................................................33 MIF Format—Ligature List ................................................................................................33 MIF Format—State Tables .................................................................................................34 The class list.........................................................................................................................34 The state array .....................................................................................................................35 The action list.......................................................................................................................35 MIF Format—Contextual ...................................................................................................36 Another example..................................................................................................................37 MIF Format—Insertion.......................................................................................................39 MIF Format—Rearrangement ............................................................................................40 Using Justification Input Files ................................................................................................41 Introduction .........................................................................................................................41 How AAT Justification Works............................................................................................41 The Factor Phase .................................................................................................................42 The Assignment Phase .........................................................................................................42 The Postcomp Phase............................................................................................................43 The Justification Class.........................................................................................................43 Overall JIF Format .............................................................................................................43 The Header ..........................................................................................................................44 The “Factors” table part.......................................................................................................45 The “Classes” table part .......................................................................................................45 ii The “Postcomp” table part ...................................................................................................46 Ligature Decomposition actions ..........................................................................................47 Unconditional Add actions...................................................................................................47 Conditional Add actions.......................................................................................................47 Stretch actions......................................................................................................................48 Ductility actions...................................................................................................................48 Some Examples....................................................................................................................49 Simple Latin, no intercharacter spacing...............................................................................49 Adding intercharacter spacing .............................................................................................50 iii Introduction Apple’s font tool suite consists of the following tools: • ftxanalyzer • ftxdiff • ftxdumperfuser • ftxenhancer • ftxinstalledfonts • ftxruler • ftxvalidator The tools require that the following framework be installed as well: • FTX.framework These tools encompass most of the key functionality of our older font tools and considerable new functionality. We hope to be able to provide fuller functionality as time progresses. Unlike our older tools, the new tools are all command-line tools. This means that one typically runs them from within the Terminal application and not by double-clicking on them. There are a number of advantages to this: 1) Command-line utilities are faster to launch and run. 2) Command-line utilities can have options specified when they’re launched, rather than by manipulating menus after launch. 3) Command-line utilities can be executed from within scripts. Suppose, for example, that I want to examine the ‘cmap’ table of a font called MyFont, which is found in the file MyFont.suit in my Documents folder. I would do the following after launching Terminal: cd ~/Documents ftxdumperfuser -t cmap -pu -A d MyFont.suit When done, a file named MyFont.cmap.xml will be in my Documents folder, which I can then examine and edit. As the file’s name implies, the new font tool suite, as much as possible, uses XML as a document format. This, too, has advantages: 1) XML files are text-based and can be edited by a large number of existing applications. They can be checked into source repositories such as CVS. 2) XML files have well-defined mechanisms for such things as representing non-ASCII text v (needed in the ‘name’ table), comments, and so on. 3) Using XML allows us to coordinate with other people on producing standard file types and formats for font-related data.