What Is an .OTF File?
OpenType font
OpenType Font (.otf)
Overview
OpenType is the font format used across virtually every modern operating system, application, and browser. An .otf file contains glyph outlines, metrics, character-to-glyph mappings, and the layout rules that drive typographic features such as ligatures, kerning, small caps, and alternate figures.
The .otf extension conventionally signals a font whose outlines are stored as PostScript/CFF cubic Bézier curves, while .ttf signals TrueType quadratic curves. Both are OpenType files using the same container and the same table structure - the difference is which outline table is present.
Technical Specifications
Format Details
- MIME Type:
font/otf - File Extensions:
.otf,.otc(OpenType Collection) - Category: Font
- Outline type: PostScript/CFF (cubic Bézier)
- Specification: ISO/IEC 14496-22 (Open Font Format)
- Developed by: Microsoft and Adobe
- Released: 1996
Magic Numbers
The first four bytes (the "sfnt version") identify the outline flavour:
OTTO 4F 54 54 4F CFF outlines → typically .otf
0x00010000 00 01 00 00 TrueType glyf → typically .ttf
true / ttcf 74 72 75 65 TrueType (Apple) / font collection
A file named .otf that begins 00 01 00 00 contains TrueType outlines despite its extension - perfectly valid, and another case where the extension describes convention rather than content.
File Structure
An OpenType font is a table directory followed by independent binary tables:
Offset Content
0x00 sfnt version ("OTTO")
0x04 numTables, searchRange, entrySelector, rangeShift
0x0C Table directory: for each table → tag, checksum, offset, length
... Table data
Required tables
head: global font header: units per em, bounding box, version.hhea/hmtx: horizontal metrics: ascender, descender, advance widths.maxp: maximum profile: glyph count and resource limits.cmap: the character-to-glyph map, from Unicode code points to glyph IDs.name: human-readable strings: family name, style, licence, designer.OS/2: Windows and typographic metrics, weight class, width class.post: PostScript glyph names.CFF: the compact font format table holding the actual outlines (in.otf).
Layout tables
GSUB: glyph substitution: ligatures, small caps, contextual alternates, stylistic sets.GPOS: glyph positioning: kerning, mark attachment, cursive connection.GDEF: glyph definitions used by the layout engine.BASE,JSTF: baseline and justification data.
GSUB and GPOS are what make OpenType more than a glyph container. They encode script-aware rules, which is why complex scripts such as Arabic, Devanagari, and Thai render correctly.
Variable fonts
OpenType 1.8 (2016) added variable font tables - fvar, gvar, avar, HVAR - allowing one file to describe a continuous design space along axes such as weight, width, and optical size. A single variable font can replace an entire family, which is a substantial win for web performance.
History and Development
In the early 1990s two incompatible formats competed: Apple and Microsoft's TrueType, and Adobe's Type 1 PostScript fonts. Microsoft and Adobe announced OpenType in 1996 as a unification - one container that could hold either outline type, with a shared table architecture and much richer layout features.
Adobe converted its entire type library to OpenType and ended Type 1 support in 2023. The format was standardised as ISO/IEC 14496-22, and the web variants WOFF and WOFF2 wrap the same table structure with compression for delivery over HTTP.
Common Use Cases
- Professional typography: print and editorial design relying on ligatures, alternates, and small caps.
- Operating system and application UI: system fonts across Windows, macOS, and Linux.
- Web typography: usually converted to WOFF2 for delivery, but authored and licensed as OTF.
- Multilingual documents: complex-script shaping via GSUB/GPOS rules.
- Branding: custom corporate typefaces distributed to teams.
How to Open and Install an OTF File
Installing
- Windows: right-click the file and choose Install, or Install for all users. Fonts live in
C:\Windows\Fonts. - macOS: double-click to open Font Book, then Install Font. Fonts live in
~/Library/Fontsor/Library/Fonts. - Linux: copy to
~/.local/share/fonts/and runfc-cache -fv.
Previewing without installing
- Font Book (macOS) and Windows Font Viewer both preview on double-click.
- FontForge: a free, cross-platform font editor that opens and dissects OTF files.
- fontTools: the standard Python library for inspecting and modifying font binaries.
Inspecting from the command line
# Dump the table directory and name records
ttx -l font.otf
ttx -t name -o - font.otf
# Convert the binary font to an XML representation and back
ttx font.otf # produces font.ttx
ttx font.ttx # rebuilds a binary font
# List fonts and query the system font cache
fc-query font.otf
fc-list | grep -i "family name"
Converting for the web
# OTF to WOFF2 for web delivery
pyftsubset font.otf --flavor=woff2 --output-file=font.woff2 \
--unicodes="U+0000-00FF,U+2010-2027"
# Or with the reference compressor
woff2_compress font.otf
Subsetting matters: a full font may carry thousands of glyphs, while a Latin-only web page needs a few hundred.
Advantages
- Cross-platform: one file works on Windows, macOS, and Linux.
- Rich typography: ligatures, alternates, and script-aware shaping via GSUB/GPOS.
- Large character sets: up to 65,536 glyphs, with full Unicode mapping.
- Compact outlines: CFF cubic curves are typically smaller than equivalent TrueType outlines.
- Variable font support: an entire family in a single file.
- Standardised: an ISO specification with multiple independent implementations.
Limitations
- Hinting differences: CFF hinting behaves differently from TrueType hinting, and rendering at small sizes varies by platform and rasteriser.
- Not web-optimised: uncompressed; WOFF2 is the correct delivery format.
- Licensing complexity: desktop, web, app, and embedding rights are usually licensed separately.
- Feature support varies: many applications expose only a fraction of a font's OpenType features.
- Extension ambiguity:
.otfdoes not guarantee CFF outlines.
Related Formats
- TTF: the TrueType-outline flavour of the same container.
- WOFF and WOFF2: compressed web packaging of OpenType data.
- POSTSCRIPT: the page description language whose Type 1 fonts OpenType replaced.
File Information
OpenType font
Font
.otf
font/otf
Related File Types
Other file types in the Font category you might also need:
Start Analyzing OTF Files Now
Use our free AI-powered tool to detect and analyze OpenType font files instantly with Google's Magika technology.
⚡Try File Detection Tool