Choosing a scalable font format

This note was originally written in the early 2000s, but remains relevant today.

There are quite a few scalable font formats in existence. This leads to a lot of confusion by people who want to design fonts, but are not sure what font format to choose.

This document suggests that all new fonts should be created in the OpenType/CFF format. For more details, see the conclusions.

Font formats

There are three scalable font formats currently in use:

In addition, there are a number of font formats that are obsolete but can sometimes still be seen.

Type 1 (or ATM, or PostScript)

The Type 1 font format was introduced by Adobe in 1984 with their PostScript page description language. For many years, it was not publicly documented, and Type 1 was only supported by Adobe products.

Nowadays, the Type 1 format is publicly documented, and most non-Adobe software supports it fully. As far as I know, there are no patents that cover the Type 1 format (although individual Type 1 rasterisers might use patented techniques).

Type 1 fonts are usually distributed in a file with a .pfb or .pfa extension, and an extra file with a .afm extension. An extra file with a .pfm extension may also be present, and is only used on Windows.

TrueType fonts (or OpenType/TFF)

The TrueType font format was introduced by Apple for use with Mac OS version 6.

While the TrueType format has been published since the beginning, parts of the TrueType font format are claimed to be covered by patents (notably the instruction that performs a dot product). For that reason, Free/Open Source rasterisers only implement part of the TrueType format.

TrueType fonts are usually distributed in a file with a .ttf extension, although .ttc, .otf or .otc may also be used.

OpenType/CFF (or CFF, Type 1c or Type 2)

OpenType/CFF is a font format that combines the efficient file format of TrueType with the simple and well-understood glyph format of Type 1. Adobe appear to be using OpenType/CFF for new fonts rather than Type 1.

OpenType/CFF fonts are usually distributed in a file with a .otf extension, although .otc may also be used.

Obsolete font formats

Adobe used to provide East-Asian fonts in the CID-keyed format. This format is obsolete, and has been superseded by the OpenType/CFF format.

Older HP printers used the proprietary Agfa Intellifont format. This format is obsolete, and HP printers use TrueType since the LaserJet 4.

Older releases of X11 had support for the Bitstream Speedo format. Bitstream used to have an extensive font library in Speedo format, and they provided software for using such fonts under Windows (FaceLift, FontFusion). This format is obsolete, Bitstream fonts have been distributed in Type 1 format for as long as anyone can remember.

Sun's NeWS used the Folio F3 format. NeWS is unfortunately obsolete, and so is the F3 format, having been replaced by Type 1 in contemporary window systems from Sun.

Platform and application support

Fortunately, all three major font formats are supported by most current platforms and applications.

Microsoft Windows

Microsoft Windows supports TrueType since version 3.1 and Type 1 and OpenType/CFF since version 2000/XP.

Apple Mac OS and Mac OS X

Apple Mac OS (Classic) supports TrueType since version 6.0. Type 1 is supported since version 6.0 if ATR or ATM light is installed (free download from Adobe). OpenType/CFF is supported since version 8.6 if a recent version of ATM light is installed (free download from Adobe).

Apple Mac OS X supports Type 1 since NeXTstep 1.0. It supports TrueType and OpenType/CFF since version 10.0.

Unix/X11

X11 server-side fonts support Type 1 since X11R5, TrueType since XFree86 3.9.15, and OpenType/CFF since XFree86 4.1.0.

All versions of the Fontconfig and Xft libraries support Type 1, TrueType and OpenType/CFF.

PostScript

All versions of PostScript can use Type 1 fonts (with the exception of Sun's NeWS).

TrueType and CFF fonts can be used by Adobe PostScript since version 2017, and by Ghostscript since version 4. (CFF fonts are OpenType/CFF fonts with the wrapper stripped.) Older printers need to have fonts converted to the Type 1 format, which is usually done automatically by the printer driver.

PDF

Type 1 fonts can be embedded in all versions of PDF. TrueType and CFF are allowed since PDF 1.2 (Acrobat 3). This means that all current PDF viewers are able to deal with all font formats

HP PCL

PCL is the native page description language of HP printers. PCL 5 is somewhat deficient in many areas, and PCL-XL is not publicly documented; if your printer can grok PostScript, you should use that instead.

Both PCL 5 and PCL-XL can only deal with TrueType fonts. Type 1 and OpenType/CFF fonts need to be converted to TrueType before downloading to the printer, which is usually done automatically by the printer driver.

TeX

Most TeX systems can use Type 1 fonts.

TrueType fonts are supported in current versions of dvips, pdftex, dvipdfm and dvipdfmx.

With the notable exception of dvipdfmx, most current TeX utilities do not support OpenType/CFF; such fonts need to be converted to Type 1, which is done automatically by font installation programs (such as LCDFtools).

Quality

All of Type 1, TrueType and OpenType/CFF allow for the creation of high-quality fonts for typesetting and printing on high resolution printers.

For rendering on low-resolution devices (such as computer displays), Type 1 and OpenType/CFF allow the inclusion of a simple but reasonably effective set of hints to help with scan conversion. TrueType allows for the inclusion of a more extensive set of instructions.

In principle, TrueType fonts can be “instructed” to make arbitrary tweaks to fonts for display on low-resolution examples. And, indeed, there are a few specially-designated “screen” or “web” available that show that this can be done.

In practice, however, Type 1 hints are easy to create, while the process of creating TrueType instructions is complex and undocumented. For that reason, almost all TrueType fonts are of much lower quality then well-hinted Type 1 and OpenType/CFF fonts.

Convertibility

Conversion from Type 1 to OpenType/CFF is lossless. Conversion from OpenType/CFF to Type 1 loses almost all metadata; however, the conversion preserves almost all glyph data (some exotic hints need to be replaced by simpler constructions), and no visible degradation in quality should result.

Conversion between TrueType and any other format is lossy, and results in a visible degradation of font quality; such conversion should be avoided if possible.

Size and compressibility

OpenType/CFF is the most compact font format of the three. Type 1 is somewhat larger, with TrueType being larger still. This should not be a problem on modern machines, except when fonts are embedded within documents (such as in PDF).

OpenType/CFF and TrueType fonts compress well. As Type 1 fonts are encrypted, they do not compress, except if special precautions are taken.

Performance

OpenType/CFF and TrueType are random-access formats: a font can be used without the whole font being loaded in memory. With Type 1, the whole font needs to be loaded in memory before it can be used.

TrueType was designed to be faster to rasterise than the remaining two formats. While this may have been significant at the time of M68k Macs, it is completely irrelevant today.

International support

The OpenType wrapper format, used by both TrueType and OpenType/CFF, has extensive support for internationalisation. This includes efficient coding of very large fonts (such as fonts for East-Asian languages) and support for complex writing systems (such as Arabic or Devanagari).

Some nasty hacks notwithstanding, the Type 1 format is limited to the simple alphabetic scripts, Latin, Greek and Cyrillic.

(And Klingon.)

Conclusions

Under most circumstances, new fonts should be created in the OpenType/CFF format. This format is simpler than TrueType, and allows (almost) lossless conversion to the Type 1 format, while supporting fine typography, complex scripts and large character sets.

Type 1 fonts may be converted to OpenType/CFF, as this conversion is lossless. TrueType fonts should not be converted.

You may want to use TrueType if you you are one of the three people in the world who know how to properly generate a TrueType instruction stream. But then, you probably don't need this document.

Juliusz Chroboczek