Make Ot Fuser Guide
Make Ot Fuser Guide
5 OpenType/CFF compiler
User Guide
Overview
MakeOTF is a tool designed to create an OpenType font from a source font file and from a text file
containing high-level descriptions of OpenType layout features. It is designed to run as command-
line tool: a command typed into the Terminal window on Mac OS X, or in the DOS window on
Windows. Note that MakeOTF is only a compiler of font data, not a font editor.
MakeOTF requires a number of source files that can all be specified through options for the
makeotf command:
font. Usually named font.pfa or cidfont.ps. This can be either a Type 1 or CID font file, a Tru-
eType font file, or an OpenType/CFF font file. Note that only the glyph outlines are taken from
the source font..
features. A text file which provides the definitions for the OpenType layout feature rules, and
specifies values for some of the OpenType table fields that will override the default values
calculated by MakeOTF.
FontMenuNameDB. A text file which provides the Windows and Mac menu names for the font.
GlyphOrderAndAliasDB. This file serves three purposes. One purpose is to establish the glyph ID
order in the font. Another is to allow glyphs in the output .otf file to have different names
than the glyphs in the input source font data. This permits developers to use friendlier names
during development of a font, and use different names in the final OpenType file. The third is
to provide Unicode values for the glyphs. MakeOTF will provide Unicode values by default
for some glyphs, but not all.
An additional file, fontinfo, is not required, but if present, will be examined for keywords that
cause MakeOTF to set some specific options.
In order to avoid having to enter the options to specify the necessary files every time you want
to build an OpenType font, MakeOTF can save a font project file that stores all desired options.
MakeOTF will always write the last set of options used, to a file named current.fpr located in the
same directory as the input font file. (Project files can also be saved under other names)
Options can be added to the makeotf command to set parameters that change how MakeOTF
builds an OpenType font. When options conflict, the last one on the command line will override
any earlier conflicting options.
Using MakeOTF
MakeOTF comes in two parts which can actually be called independently:
makeotfexe is a program written in C, and is actually the tool that builds the OpenType font file.
It requires, however, that all the source files be explicitly specified with options on the com-
mand line.
MyFont Family/
FontMenuNameDB
GlyphOrderAndAliasDB
Roman/
features.family
MyFont-Bold/
font.pfa
features
features.kern
MyFont-Regular/
font.pfa
features
features.kern
Italic/
features.family
MyFont-Italic/
font.pfa
features
features.kern
MyFont-BoldItalic/
font.pfa
features
features.kern
The idea is that some data, such as the files FontMenuNameDB and GlyphOrderAndAliasDB, will be
shared between all members of the type family, whereas other data will only apply to a subgroup of
the family. By placing the shareable data at a higher level in the directory tree, one can avoid having
multiple copies of the same data, which means there will be less files to edit, in case the data needs
to be changed. This is most important for the features.family file.
Usually, positioning rules such as kerning (features.kern) are specific to each font, but most
(or all) of the substitution rules are likely to be the same for all fonts. A good practice is to have a
features file for each family member, in the same directory as the source font file, and then use an
include statement to reference feature files located higher in the directory tree. In the example above,
there are two separate features.family files, one for Roman and another for Italic. These can, in
turn, be shared between all family members under each branch. The need for two different features.
and then type the makeotf command, with the options needed. For example:
makeotf f myfont.pfa ff myfeatures b r
or
makeotf fp myproject.fpr
MakeOTF options
Option Setting Description
fp <file path> Specify path to project file. If no path is given, the default is current.fpr.
MakeOTF will read the options from this project file. The project file
contains values only when they differ from the default value. The fp op-
tion can be used with other options, but must always be first. Additional
options will override those read from the project file. For example, fp
release.fpr o test.otf will build an OpenType font with all the options
in the release.fpr project file, but will write the output file as test.otf,
instead of <PostScript-Name>.otf.
f <file path> Specify path to input font. If not provided, MakeOTF assumes the file
name is font.pfa.
o <file path> Specify path to output font. If not provided, MakeOTF assumes the file
name is <PostScript-Name>.otf.
b Set style to Bold. Affects style-linking. If not provided, MakeOTF assumes
that the font is not bold.
i Set style to Italic. Affects style-linking. If not provided, MakeOTF as-
sumes that the font is not italic.
ff <file path> Specify path to features file. If not provided, MakeOTF assumes the file
name is features.
-gs Omit any glyphs that are not named in the GOADB file. Works only if
either the -ga or -r options is specified.
mf <file path> Specify path to FontMenuNameDB file. If not provided, MakeOTF will
look in the current directory for a file named FontMenuNameDB, and then
one directory up, and finally two directories up.
Options are applied in the order in which they are specified: r nS will not subroutinize a font,
but nS r will subroutinize a font. Option values are read (in order of increasing priority) from
first the fontinfo file keyword/value pairs, then the specified project file, if any, and then from the
command line, in order from left to right.
MakeOTFv2.5 User Guide 5
Subroutinization is a process by which common elements in a set of glyphs are decomposed in
separate subroutines. This can reduce the size of the final font but can require extreme amounts of
memory and time for a large font, such as CID fonts. MakeOTF may need as much as 64 Mbytes of
memory for large Roman fonts, and will do most with only 32 Mbytes, but it may need 768 Mbytes
of memory to subroutinize a 5-Mbyte CID font. Subroutinizing is reasonably fast when done all in
memory: a few minutes for a Roman font, half an hour to three hours for a CID font. However, if
the system must use virtual memory, the time required can increase by a factor of 20 or more. Sub-
routinizing is likely to be useful for Roman fonts, and for Korean CID fonts. Japanese and Chinese
CID fonts usually only yield a few percent size reduction with subroutinizing, due to fewer repeating
path elements.
FontMenuNameDB - Version 2.
Previous versions of MakeOTF used a different version of the FontMenuNameDB file, and wrote the
Macintosh font menu names differently than the Windows font menu names, and not according to
the OpenType spec. This is because of some history of the early efforts to get OpenType fonts work-
ing on the Mac OS. However, for some years Apple has been following the OpenType spec when
making Apple OpenType fonts, and has fully supported the OpenType font menu names. As a result,
this version of MakeOTF has implemented new syntax for the FontMenuNameDB, and will create
the name table according to the OpenType spec when this new syntax is used.
Fonts made with earlier versions of MakeOTF will not be disadvantaged, as all Adobe fonts to
date and many third-party fonts were made this way, and all programs look first to the Windows font
menu names when they exist, as this is where the style-linking names can most reliably be found.
The earlier version of the FontMenuNameDB may still be used. The main reason to change is that
the newer version is easier to explain and understand.
The FontMenuNameDB file is used to specify font menu-naming information. It consists of a text file
that may contain information for several different fonts. Each font entry starts with the <PostScript
Name>, and is followed by the various menu names. These names are used to build the name table
strings that describe the font. This allows one to put the menu names for all the fonts in a single file,
making it easier to coordinate menu names across a family.
In many programs font menus, the fonts will be listed in a cascading menu showing the Family
names in the first level, followed by a pop-out list of Style names, containing all fonts that share the
same Family name. In other programs, the menus will show a flat list of all fonts using the Full
name. makeotf will build this by concatenating the Family name, a space character, and the Style name.
For complete description of these issues, please read the OpenType specification section on the name
table, available from http://partners.adobe.com/public/developer/opentype/index_name.html.
Examples
Regular font of Adobe Garamond Pro
[AGaramondPro-Regular]
f=Adobe Garamond Pro
s=Regular
The l= key is not used, so the compatible family menu name is the same as the Preferred Family
name. The m=1, key is not used, so the Macintosh compatible menu name built by MakeOTF will be
Adobe Garamond Pro Regular . The key s= is not actually necessary.
The l= key is not used, so the compatible family menu name is the same as the Preferred Family
name. This font will be style-linked with the Regular, because they share the same compatible family
menu name.
Same as above.
This font needs to be part of a new style-linking subgroup. This means the key l= is used to set a
compatible family menu name different from Preferred Family name. In consequence, a Macintosh
compatible Full name is also assigned with the key m=1,. The default style will be Regular. The com-
patible family menu names are abbreviated to Adobe Garamond Pro Sb rather than Adobe Garamond
Pro Semibold, in order to keep the menu names, of the remaining fonts belonging to this style-linked
subgroup, within the 31-character limit. The key s= had to be used, as the preferred style name is
not Regular, the style-linking style.
This font is part of the same style-linking subgroup as the font in the previous example. In order
to be style-linked, they share the same l= key, but the default style will be set to Italic in this case. The
Macintosh compatible Full menu name was be built by appending the default style to the compat-
ible family menu name.
Arnold Bcklin
f=Arnold B\00f6cklin Windows
f=1,Arnold B\9acklin Mac
00f6 is the Unicode for odieresis (). Unicode hex values must have 4 digits.
9a is MacRoman encoding for odieresis. Mac char code hex values must have 2 digits for Western
script encodings, and may have 2 or 4 digits for CJK encodings.
In general, the f=, s=, and l= can be extended to set non-Latin strings by adding the triplet (plat-
form code, script code, language code) after the equal sign (=). The values are the same as described
for the name table name ID strings. For example:
The AFDKO contains the file FDK/Tools/SharedData/FontMenuNameDB, which shows the entries for
several families of the Adobe Type Library.
FontMenuNameDB - Version 1.
Versions of MakeOTF prior to FDK 2.5 used a similar synax in the FontMenuNameDB file. When
this older version syntax is used, MakeOTF will build the name table font menu names as it did in
FDK version 2.0 and earlier. These earlier versions built the Windows platform names the same.
however, only the Preferred Family and Style names were written in the Mac platform name strings,
and in respectively name ID 1 and name ID 2. The key c= set the compatbile family name for the
Windows platform. There was no way to specify a compatible family name for the Mac platform. The
key c=1, set instead a compatible value for the Mac platform Full Name String, name ID 18.
.
If the key c= is used. then MakeOTF will build the older style name table. If the keys l= or
m= are present, it will build the newer style name table . If none of these are present, then there
is no difference in how the name table is built.
GlyphOrderAndAliasDB (GOADB)
The GOADB file is used to rename and to establish an order for the glyphs in a font. It is a simple
text file with one line per glyph name. Each line contains at least two fields, and optionally three
fields. The first field is the final glyph name to be used in the output font. The second field is the
friendly name used in the source font data. The third field is a Unicode value, specified in the form
uniXXXX or uXXXX, where XXXX is a Unicode value. The source font is not required to have any
glyphs that are named in the GlyphOrderAndAliasDB file. There is a sample version of this file at the
folder FDK/Tools/SharedData/.
It should be noted that the ordering, renaming, and Unicode override operations are applied only
if the r option or the -ga option is specified. These operations work as follows.
1) Establish a specific glyph order in the output OpenType font. Any glyph names in AppendixA
Standard Strings of Adobes Technical Note #5176, The Compact Font Format Specification, will
be ordered first in the font, in the order given in the CFF specification. All other glyphs will
be ordered as in the GOADB file. Glyphs not named in either the CFF specification nor in the
GOADB file, will be ordered as they were in the original source font. The CFF specification can
be found at http://partners.adobe.com/public/developer/en/font/5176.CFF.pdf
2) Rename glyphs in the source font to different names in the output OpenType font. Note
that both the source font file and the features definition file must use the same glyph names
one cannot use a source font file with development names, together with a features file that
contains final names, unless the options r or ga are used.
3) Override the default Unicode encoding by MakeOTF. MakeOTF will assign Unicode values
to glyphs in a non-CID font when possible. (For a CID font, the Unicode values are provided
by the Adobe CMap files.) The rules used are as follows:
a) If the third field of the GOADB record for a glyph contains a Unicode value in the form
uniXXXX or uXXXX (where XXXX stands for a Unicode value), assign that Unicode value
to the glyph. Else b);
b) If a glyph name is in the Adobe Glyph List For New Fonts v1.6 (FDK/Technical Documentation/
GlyphNames/aglfn13.txt), use the assigned Unicode value. Else c);
Note that MakeOTF no longer assigns glyphs Unicode values from the Private Use Area (PUA)
block. If such Unicode values are needed, they must be specified in a GOADB file.
fontinfo
The fontinfo file is a simple text file containing key-value pairs. Each line contains two white-space
separated fields. The first field is a keyword, and the second field is the value. makeotf will look for
a fontinfo file in the same directory as the source font file, and, if found, use it to set some default
values. These values will be overridden if they are also set by a project file, and then by any makeotf
command-line options. The keywords and values currently supported are:
2) The CMap files will be under a directory which is named after the Registry-Order-Supplement
from the cidfontinfo file, e.g. Adobe-Japan1-4, Adobe-GB1-4.
The path to the variation sequence file must be specified with the option -ci <file path>.
The format for the UV and UVS sequence is the same. However, the Registry-Order field is omit-
ted, and the glyph is identified by a glyph name from the GOADB file.
Synthetic Glyphs
MakeOTF includes two Multiple Master fonts built-in, one serif and one sans-serif. With these it can
synthesize glyphs that match (more or less) the width and weight of the source font. It requires the
glyphs zero and O to be present in the font, in order to determine the required weight and width. If
the option adds is used, the list of glyphs to generate will be derived from the concatenation of the
following three groups of glyphs:
1) Euro
2) Apple Symbol glyphs. These glyphs were formerly supplied by the Macintosh ATM and the
Laserwriter drivers. This is no longer true for OpenType fonts.
3) A miscellany of glyphs missing from some of the Adobe Type Library fonts, which were just a
few glyphs short of containing the full Adobe PostScript Standard glyph set.
Synthetic Glyphs
Euro Delta Omega
approxequal ^ asciicircum ~ asciitilde
@ at \ backslash | bar
brokenbar currency dagger
daggerdbl degree divide
= equal estimated fraction
> greater greaterequal infinity
integral < less lessequal
litre logicalnot lozenge
minus multiply notequal
numbersign onehalf onequarter
paragraph partialdiff perthousand
pi + plus plusminus
The glyphs are synthesized from the MM fonts which MakeOTF has built-in. It will try to match
the glyph width of the zero and the dominant stem width of the target font. However, MakeOTF
cannot stretch the MM font data to match very thick strokes, very wide glyphs, and it cannot match
the designs stem contrast.