FontCreator Tutorials
Placeholder 1 -
The Difference between TrueType and OpenType
and TTF vs OTF
the ttf and otf extensions
written by Erwin Denissen, published March 25, 2020
More than half the world’s population uses fonts daily. Most people don’t care about the internals, but some want to know if there is a difference between TrueType and OpenType, or if they can decide what font is best based on the file extension.
This article aims to debunk the myths and misinformation about font formats that circulate on the Internet. For example:
Source | Statement / Information | Verdict |
356labs – OTF vs TTF? What's the difference? | The fonts with a .ttf file extension are relatively older than OTF | False |
MakeUseOf – OTF vs. TTF Fonts: Which Is Better? | Makes you believe TrueType fonts are ttf and OpenType fonts are otf | Misleading |
Let’s start with some relevant definitions and background information about scalable font technology:
PostScript Type 1
Adobe launched PostScript Type 1 in 1984. It became very popular among desktop publishers but is being phased out for over a decade.
TrueType
TrueType was invented by Apple in the late 1980s as a competition to Adobe’s PostScript Type 1. It is available since 1991 (Apple’s Macintosh System 7). Apple licensed TrueType to Microsoft for free and it became available on Microsoft Windows 3.1 in 1992.
OpenType
In 1994 Microsoft developed TrueType Open. It was further improved jointly by Microsoft and Adobe to become OpenType in 1996. It is an extension of the TrueType font format retaining its basic structure and adding many data structures to prescribe typographic behavior, such as ligatures, small caps, and old style figures, which allow font creators to design better international and high-end typographic fonts. While TrueType only allowed for TrueType outlines, OpenType also supports Compact Font Format based outlines (CFF is a variation of Type 1 fonts). OpenType solved many compatibility issues between Macintosh and Windows computers. Multiple Master support in OpenType has been discontinued as of version 1.3 of the specification, but since 2016 it supports font variations (see below).
OpenType Font Collection
An OpenType Font Collection (formerly known as TrueType Collection) is a means of delivering multiple OpenType font resources in a single file structure.
OpenType Font Variations (also known as Variable Fonts)
In 2016 support for font variations was added to the OpenType specification. It allows multiple font faces within a font family in a single font resource, thus for example thin, regular, bold, and heavy along with condensed and expanded can be included in a single font file, and additionally, it allows for continuous variation along the included design axes.
Web Fonts
The Web Open Font Format (both WOFF and WOFF2 versions) is a packaging format that encapsulate an OpenType font or an OpenType font collection.
Do TrueType Fonts Still Exist?
You can argue if OpenType fonts are all TrueType fonts containing additional data structures. We prefer to see OpenType as a new format, sure it is based on TrueType, but it is not the same.
If you agree to this definition, they it is safe to say all modern computers come without TrueType fonts, as no fonts known today include only the data structures as defined in the original TrueType font specification.
If you want to keep using the term TrueType for all OpenType fonts, then what’s the use? It won’t clarify a thing.
If you want to call fonts with TrueType based outlines TrueType, and the ones with CFF based outlines OpenType, then that is plain wrong. Don’t do it, instead read this article again.
Font File Extensions – TTF versus OTF
Both PostScript Type 1 and TrueType fonts are no longer made. All new fonts released are OpenType fonts, period. But why do people still refer to ttf and otf?
Because they think you can distinguish the internal outline format based on the font’s file extension. Although this is partly true, it just adds to the confusion. Let us explain it.
Concerning glyph outline formats, OpenType fonts come in these flavours:
- OpenType with TrueType based outlines (quadratic Bézier curves)
- OpenType with CFF based outlines (cubic Bézier curves, like PostScript Type 1)
- OpenType with both TrueType and CFF based outlines (rare, and not recommended)
- OpenType with only bitmaps of glyphs or with color glyphs (rare, and not recommended, better use 1. or 2. along with bitmaps or color)
Some 25 years ago Microsoft thought it would be wise, mainly for compatibility reasons, to continue to allow the original TrueType font file extension “ttf”, but only for OpenType fonts with TrueType based outlines. A new font file extensions “otf” was introduced and is allowed for both font flavors.
Since a file that ends with .otf can be either an OpenType font with TrueType based outlines or an OpenType font with CFF based outlines, the file extension should not be used to differentiate between the above OpenType font flavours. Also note, that if you take an existing font and change the file extension from .otf to .ttf it will still behave the same, so the file extension means nothing!
Here is what the official OpenType specification has to say about this:
“In all cases, software must determine the kind of outlines present in a font not from the filename extension but from the contents of the file.”
Text Layout and Rasterizer
Font vendors usually provide several font resources to choose from. This make it hard to tell which one you should use. So, what is important?
Rasterizers take the glyph outlines and output them on a device. How good the output looks mainly depends on the rasterizer, the outlines, font size, and optional hinting. Fonts usually look great on a high-resolution monitor and when printed but can look bad when viewed in an outdated web browser. So, what quality font and what outline format you need depends on your needs.
OpenType Layout Features
Another very important part of a font is the OpenType features, as those enable text-processing applications to improve text layout. Several of these advanced typesetting features are vital for complex script fonts like Arabic, while other features are used in desktop publishing and typesetting software like Adobe InDesign to activate specific character variants as available in the font. Not all software supports all OpenType layout features, so not all features are accessible in all software.
Internal Font Tables
Here is a technical summary of internal font tables that identify specific characteristics of fonts:
Pure TrueType | OpenType TT | OpenType CFF | ||
OS/2 version 0 or 1 (OS/2) | Yes | No | No | |
OS/2 version 3+ (OS/2) | No | Yes | Yes | |
TrueType based Outlines (glyf and loca) | Yes | Yes | No | |
CFF based Outlines (CFF or CFF2) | No | No | Yes | |
OpenType Features (BASE, GDEF, GPOS, GSUB, JSTF) | No | Optional | Optional | |
Desktop File Extension | .ttf | .ttf or .otf | .otf | |
Web File Extension | n.a. | .woff or .woff2 | .woff or .woff2 |
Summary
If people tell you to use OTF over TTF, they probably don’t know what they are talking about. If they refer to file extensions, or OpenType versus TrueType, or the internal outline format (TrueType based outlines versus Compact Font Format outlines), point them to this article, as that is not what OTF and TTF is about.
If they want you to use fonts containing OpenType layout features, then they should talk about that.
Pure TrueType fonts no longer exist. Forget about them. There are basically OpenType fonts with TrueType based outlines and OpenType fonts with CFF based outlines. And both flavours can contain advanced OpenType layout features.