1. Introduction

This release of the Adobe Font Development Kit for OpenType (AFDKO) contains the set of tools used by the Adobe Type Department to make OpenType fonts. These command-line programs that will allow you to build an OpenType font from an existing font, verify the contents of the font, and proof the font on screen or on paper. The AFDKO also contains useful technical documentation and some of the source material required to produce OpenType fonts, as well as instructions on how to create and structure this source material for your own font production work. Note! Although the FDK directory tree contains a number of Python scripts, none of them can be used by double-clicking on them; they can only be successfully called from the command-line. Most of the scripts now have an OpenSource license, so that you alter them as you like.

When the AFDKO is installed, all the command-line programs can be run simply by entering the command name on the Mac OSX Terminal window, or Windows XP Command window (See the file "Read_Me_First.html" in the FDK main directory for installation instructions.) All command line tools provide usage and help text with the options -u and -h. There is a separate user documentation file only for the makeotf tool. Using a command-line window may seem alarming if you are not used to it, but it is actually quite easy to learn a useful set of commands. Please read the FDK document "CommandLineHowTo.pdf", sub-titled "The Joys of Command Line", for pointers on how to get started.

Important Changes from 2.5 change number 21340

  • Several important bugs were fixed, in particular with makeotf's generation of names for stylistic alternate features and the data used by the lookup flag 'UseMarkFilteringSet'. See the FDKReleaseNotes.txt for a full list.
  • A new tool has been added, "IS", which applies hint-based scaling to a font.
  • A new tool has been added, "makeInstances", which makes regular Type1 fonts from MM Type1 fonts while applying a number of useful changes.

Important Changes from 2.0

  • The 'makeotf' program now supports all lookup types, supports named anchor and position values, and supports lookups defined outside of features. Please read "OpenType Feature File Specification" in the file "topic_feature_file_syntax.html" carefully, as many things have changed. Previously supported syntax will still work as expected, but there may now be better ways of doing things.
  • The 'makeotf' program now supports more lookupflag types, and creation of the GDEF table. Please read the sections on the GDEF table and on the "lookupflag" statement in the "OpenType Feature File Specification" in the file "topic_feature_file_syntax.html".
  • FDK 2.5 makeotf can now write the Mac platform name table Family and Style names according to the OpenType specification, and there is new syntax for the Font Menu Name DB. If you have specified Mac Family and Style names in your Font Menu Name DB, you may want to change these. Please review carefully the section on the Font Menu Name DB in the "MakeOTFUserGuide.pdf"
  • Ideographic Variation Selectors can now be added to the font, in the form of a new cmap sub-table. See: "Unicode Technical Standard #37", on the Unicode web site, for discussion of what these are, and "MakeOTFUserGuide.pdf" for how to add them.
  • Name strings can now be added for stylistic alternate features. These are specified in a feature definition, much like the 'size' feature menu names. See "OpenType Feature File Specification" in the file "topic_feature_file_syntax.html".
  • makeotf will now build OpenType/TTF fonts when TTF fonts are used as a source. The one limitation is that the glyph order and glyph names cannot be changed from the original font.
  • makeotf now sets the OS/2 table Default Character to 0, the glyph id for the ".notdef" char, per the OpenType spec. However, this causes QuarkXPRess 6.5 to not print the OpenType/CFF font. If you need this compatibility, use the makeotf option '-dcs" to write the OS/2 Default Character value as 32, the Unicode value for the "space" character, as makeotf did previously.
  • A new tool has been added, "ttxn", which is useful for comparing different versions of a font.
  • For a complete list of bug fixes, please refer to the "FDKReleaseNotes".

Warning! The new support for mark attachment lookups and lookup flags has not yet been used by Adobe Type Development, has been only lightly tested, and should be regarded as beta-level functionality. If you use these new features, test them carefully to ensure that your font works as expected.

Important Notes for users of FDK 1.6

  • FDK 2.0 now supports OS/2 table v4. Please read the "MakeOTFUserGuide.pdf" about this.
  • The project file format has changed.
  • The default feature file script tag for makeotf is now the "DFLT" script rather than the "latn" script. This has several consequences.
    • To get the same script/language coverage as before, you need to explicitly specify "languagesystem latn dflt;". Please read "OT Feature File Syntax.html" on this.
    • If you used language tags without previously specifying the "latn" script explicitly, makeotf will report an error, as the "DFLT" script tag can only be used with the language tag "dflt".
    • FontLab 4 and 5 use the makeotf library from FDK1.6, so they will not support the script tag "DFLT".

2. Overview of Programs

The tools fall into several different functional groups.

2.1) Making/editing fonts

autohint

This program is the Adobe auto-hinter. It can be applied to both OpenType/CFF and Type 1 fonts. Works with Type 1 and OpenType/CFF fonts only. It uses Just von Rossum's fontTools Python package for accessing and changing the font data.

IS

This is a variant of 'tx' that will scale fonts to a different em-square size, or snap-shot a Type 1 MM font to a single-master Type 1 font, while using hinting to keep stems aligned. It can be used alone, but is most often called from the 'makeIntances' script.

makeOTF

This program will build an OpenType/CFF font from a Type 1 font and a feature file that defines the OpenType layout rules, and overrides for default values. It also requires some other meta-data files. It will also build an OpenType/TTF font from a TrueType source font file.

makeInstances

This script will generate Type 1 fonts from an MM Type 1 font, using a tab-delimited file to set values in the instances. It offers several advantages over using tx or FontLab alone.

  • You can override any field in the Type 1 Font Dict, setting FontName and PS Name and hint values.
  • You can specify that working glyphs be omitted from the instance fonts.
  • You can create "MM exception glyphs", specific glyphs that are used only in one specific instance to overwrite the matching instance font glyphs. This allows you to fix design problems for a small number of glyphs in particular instances. This function will also relace the contours of the target glyphs from the MM exception glyphs in all composite glyphs.
mergeFonts

This program will merge glyphs from one font into another, optionally copying a subset from the source fonts, and changing the names of the glyphs. It can also be used to subset and change the glyph names in a font. By using the same font more than once as a source with different mapping files, glyphs can be duplicated under other names. It can also convert a named-keyed font to a CID-keyed font.

rotateFont

This tool will rotate and translate glyphs in a font, including the hints. However, hints will be discarded if the rotation is not a multiple of 90 degrees.

sfntedit

This is the command-line version of the old FDK 1.6 OTFTableEditor. It allows you to cut and past the entire binary block of a font table from one font to another. You do this by first using it on a source font with the "-x" option to copy a table from the source font to a separate file, and then using it with the "-a" option to add that table to a target font. It can also be used to simply delete a table, and to fix the font table checksums.

stemHist

This program provides reports which help in selecting the global hint data and alignment zones for Type 1 hinting. You should look at the reports from this tool in order to select the most common stem widths, and then use a program such as FontLab or Fontographer to set the values in the font. This should be done before hinting the font. Works with Type 1 and OpenType/CFF fonts only.

setsnap.pl

This PERL script program takes in the report from stemHist, and recommends a set of values to use for the Type 1 font standard stem arrays. This is not as good as choosing the most relevant values yourself, but better than not providing any values. This script depends on having the Perl interpreter installed, which is not installed by default on Windows. You can get the Perl interpreter from: http://www.perl.com.

ttx

This tool can dump all or a few tables from an OpenType font to a human-readable text XML file, and can compile this XML file back to full OpenType font. It is an ideal tool for making simple changes of a few values. Used with care, it can also be used to make extensive changes. This is tool is provided by Just von Rossum as part of the fontTools library. It is provided here for convenience, in a form that does not require an installed Python interpreter.

tx

This is the command-line version of old FDK 1.6 CFFChecker. It can be used to convert most font formats to CFF or Type 1 fonts. TrueType fonts will lose their hinting in the process. It cannot convert from PostScript to TrueType, and cannot rasterize TrueType fonts. When used to convert from a Type 1 or CFF font, it undoes subroutinization, so that each glyph contains all the drawing operators, rather than referring to subroutines for common path elements. However, it now has a new option to apply subroutinzation to the output font.

type1/detype1

These two programs will respectively compile and decompile a Type 1 font from a plain-text representation that is easy to edit. This is good for fixing individual fields. It is also good for copying a specific path element to many glyphs.

2.2) Proofing

spot

This is the command-line replacement for the old FDK 1.6 OTFProof. This program can report data from an OpenType font in a variety of ways. All tables can be shown as a text report of the low-level structure of the table. Most tables can be shown with a report in a more human-readable format. Some tables, including the GPOS and GSUB layout tables can be shown graphically, by outputting a PostScript file that can be sent to a printer, or viewed in Mac OSX Preview, Adobe Acrobat or Adobe InDesign.

tx

This tool has two modes that are useful for proofing. With the "-bc" option, it will rasterize a glyph to the command-line window, using ASCII characters. This is surprisingly useful when you want a quick look at a glyph. With the "-pdf" option, it will write a pdf file which shows the glyphs in the font, either 320 per page or 1 per page.

ttx

The XML format output offers a useful report for most of the data in an OpenType font.

charplot

Shows one glyph per page. Shows the nodes and control points.

digiplot

Format favored by CJK developers; shows a large filled outline, useful glyph metrics, and a larger outline with the nodes marked.

fontplot

Make a pdf file showing all the glyphs in the font. This fills a page with many glyphs, and shows just the filled outlines at a small point size, with some info around each glyph. Works with OpenType fonts and Type 1 fonts.

fontsetplot

Make a pdf file showing all the glyphs in in a list fonts. The glyphs are shown in glyph ID order, with a fixed spacing of one em, with the glyphs from one font in one line, so that all glyphs with the same glyph name from different fonts should be in a single column. This is used to visually confirm that that charsets are the same, and that glyph shapes are similar. It is useful for catching cases where a place-holder glyph outline was pasted in for a glyph name, but never corrected to the correct shape. The fonts are sorted first by length of character set, then by alphabetic order of the character sets, then by PostScript name.

hintplot

Shows one glyph per page. Shows hints and alignment zones.

waterfallplot

Shows a waterfall of point sizes for all glyphs in the font. This is used to evaluate hinting. In order to allow hinting to be seen, the font is embedded in the PDF, and glyphs are referenced by char code. Does not yet work with TrueType and CID-keyed fonts.

Note that the tools ending in "plot" are all simply small command-file scripts that call a single Python script with different options. The "-h" option for all these scripts will produce the same list of all the options supported by the single Python script. You can customize the PDF proofs by providing additional options. Look at the command files; these can by edited to supply additional options to the main script. This was completed shortly before the FDK was released, and has seen little use. It will improve over time. It uses the OpenSource Python package "Pickle" to create the PDF documents, and Just von Rossum's fontTools Python package for accessing the font data.

2.3) Validation

autohint

The auto-hinting program will report at length about hinting issues. Some of these you can ignore, such as reports about near misses when a stem could be controlled by a hint-zone but is just a little too wide or too narrow. By adjusting either the stem widths or the hint-zones according to these reports, you can include more stems in the set that are controlled by hints, but you can also reasonably decide that is not worth the effort. However, many complaints do need fixing, such not having nodes at vertical or horizontal extremes of a curve.

checkOutlines

This tool will check the quality of the glyph outline data, and should always be used. It is very good at detecting serious problems, such as overlap and incorrect path direction. It is overly enthusiastic about finding a number of smaller issues, but is right often enough to be worth checking al the error messages. It can also fix the problems it finds, but you should always check any glyphs that it changed - the fixes are not always better than the original problem. It uses Just von Rossum's fontTools Python package for accessing and changing the font data.

compareFamily

The tool examines all the fonts in a directory and runs many quality checks. It is the only tool which checks consistency and compares data across a family of fonts, as well as in a single font. It will point out any errors in naming within a style-linked group. Every time the Adobe Type Department finds a bug in the Adobe OpenType fonts, we try to put a check in here. It is not a complete validation tool, but it does represents several years of experience of mistakes made by typographers.

kernCheck

This tool will report collisions between kern pairs, or, with the option -a, will report any collisions between any pair of glyphs. It will also report when rules in one GPOS table kern feature mask rules in a different subtable of the same lookup.

NOTE! the time needed is related to the square of the number of glyphs. This script will run in a few minutes for a font with 300 glyphs, but can take more than an hour for a font with 3000 glyphs.

sfntdiff

This is the command-line version of the old FDK 1.6 OTFCompare. This does a low-level comparison of two OpenType font files. It is most useful for quickly checking if two fonts are identical, or in which tables they differ.

ttx

The best way to see in detail how two fonts differ is to use the ttx tool to dump XML files, and then compare them with a good difference editor, such as BBEdit on the Mac, or UltraEdit on the PC. This tool was developed by Just von Rossum of LettError, and is available under OpenSource licensing from: http://sourceforge.net/projects/fonttools/

ttxn

This tool is used to test if two fonts are functionally the same. It sorts and modifies the output from the ttx and tx tools to build a normalized text dump that eliminates differences due to issues such as OTL table record order, glyph order and subroutinzation differences. It writes one file for each table in the font. A good difference editor, such as BBEdit on the Mac, or UltraEdit on the PC, can then be used to compare the output files from two different fonts. It is particularly useful in comparing older and newer versions of the same font.

tx

This tool has a couple of modes that are good for testing. It will show only data about the font program with in a font file, either CFF or TrueType. The "-dump" option is good for looking at a text report of the CFF font global and glyph data. The "-bc" option takes additional option that outputs a hash of the rasterized glyphs to a file. This good for finding if hinting has changed in a font; if the hash files for a set of glyphs are the same between two fonts, then the glyphs rasterized identically at the specified point size. You can use this to judge if fonts are functionally equivalent, even if the outlines are not exactly the same. Finally, converting any font to CFF will yield error reports if the font data is not syntactically correct, and if any glyphs are not hinted.

3. Overview of Contents

Inside the AFDKO are the following components:

  • The file'Read_Me_First.html": the installation instructions
  • "Adobe Font Development Kit for OpenType (AFDKO) Overview" in the file "topic_overview.html": - the file you are reading now, and which provides an overview of the tools.
  • The sub directory "Tools" contains:
    • osx: The set of Mac OSX tools
    • win: the set of Windows tools
    • FontLab: scripts for FontLab. None of these are polished production tools. They are mostly Python scripts written once and used once for a particular need, with little error checking, and are supplied mostly as a example of how to do something in FontLab. The only documentation is at the beginning of the script files - open them in an editor. A number of the commands - notably "AutoHint", "Check Outlines", and the PDF proofing scripts - will open a dialog for setting preferences if you hold down the CONTROL key while clicking on the FontLab Macro run button.
    • the sub-directory "SharedData", a directory tree containing shared data files used by various tools.
      • The "FontMenuNameDB" file is a set of entries used for some Adobe OpenType fonts as an example, for when you make your own for use with makeotf.
      • The "GlyphOrderAndAliasDB" file is also an example file for making your own for use with makeotf. This, however, can be used as is, and contains the mappings used by Adobe fonts.
      • The file "featurefile.plist", which provides feature file syntax coloring and function block selection in BBEdit. See the top of the file for the location where it should be installed.
  • The sub-directory "Technical Documentation" contains a series of reference documents that will be helpful when developing OpenType fonts.
    • "Command Line How-To: Joys of the Command Line", in the file "CommandLineHowTo.pdf": an introduction to using the command-line window.
    • "Beginner’s Guide to Digitally Signing OpenType Fonts", in the file "digital_signature_guide.htm": an old but still useful set of instructions on how to digitally sign fonts.
    • "MakeOTFv2.5 OpenType/CFF compiler User Guide", in the file "MakeOTFUserGuide.pdf": the user guide for the makeotf tool.
    • "NewFeatureSyntaxIn2.5.txt", a series of examples of the new feature file syntax.
    • "OpenType Feature File Specification", in the file "topic_feature_file_syntax.html": an HTML document offering a detailed description of all the OpenType layout features that you can specify in your own "features" files.
    • "Unicode and Glyph Naming in PostScript Fonts" in the file "GlyphNames/unicodegn.html": an HTML document that describes Adobe PostScript® glyph naming conventions in the context of Unicode. The purpose of these conventions is to attach standardized semantics to glyph names, including glyphs that represent characters that don't have standard Unicode values like certain ligatures or glyphic variants.
    • "PRACTICAL ISSUES IN WEIGHT SETTING AND STYLE LINKING", in the file "WinWeights.html": an HTML document that summarizes the usage of OpenType tables by the Windows version of ATM.
    • "OpenType Tables supported by Windows ATM", in the file 'OT_tables_in_Win_ATM.html": an HTML document that summarizes the usage of OpenType tables by the Windows version of ATM.
    • "Issues with OpenType/CFF fonts and MS Font Validator" in the file "MSFontValidatorIssues.htm": an HTML document that lists errors from the MS Font Validator tool that should be ignored for OpenType/CFF fonts.
    • "OpenType-CID/CFF CJK Fonts: ‘name’ Table Tutorial" in the file "5149.OTFname_Tutorial.pdf": a user guide for the tools, aimed at developers who want to merge many small fonts into a single large font, such as a Japanese CID-keyed font.
    • "AFDKO Version 2.0 Tutorial: mergeFonts, rotateFont and autohint" in the file "5900.RFMFAH_Tutorial.pdf": a user guide for the tools, aimed at developers who want to merge many small fonts into a single large font, such as a Japanese CID-keyed font.

4. Support Forums

In ordIn order to support font developers in the creation of OpenType fonts with these tools, Adobe has set up a web site where the new versions can be downloaded. The FDK download web site is at the AFDKO Download site.

For questions about use of the FDK tools, please try first the FontLab forums at http://forum.fontlab.com/. FontLab and the AFDKO share a common code base for creating GPOS and GSUB layout features, and many issues will be the same. AFDKO issues are specifically covered in the forum http://forum.fontlab. com/adobe/afdko/. An alternative forum for the AFDKO is the Google Groups mailing list UAFDKOML.

There is also a public forum to which general OpenType questions are often posted. Note that this is not for discussion of the AFKO tools; it is intended only for general issues related to the development and use of OpenType fonts. To subscribe to this list, send an e-mail to: opentype-migration-sub@ indx.co.uk

Copyright 2008, 2009 Adobe Systems Incorporated

OpenType is a trademark of the Microsoft Corporation. Macintosh is a trademark of Apple Computer Inc. Adobe, the Adobe logo, Adobe Type Manager, PostScript, Adobe InDesign are trademarks of Adobe Systems Inc.

ADC feedback site

Can't find what you're looking for?  Suggest a content idea or vote up an existing topic on the new ADC feedback site.