.otf MIME type
OpenType fontfonts
font/otfOpenType desktop fonts. Convert to WOFF2 for the web.
| MIME type | font/otf |
|---|---|
| Extensions | .otf |
| Also seen as | application/x-font-opentype |
| Content-Type | font/otf |
| Compress in transit? | Yes — enable gzip or Brotli |
| File signature | 4F 54 54 4F (OTTO) for CFF-based fonts; TrueType-flavoured OpenType starts 00 01 00 00 |
Good to know
- Uncompressed, so enable gzip or Brotli if you serve OTF files.
Serve .otf files with the right type
The response header to send:
Content-Type: font/otf
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
font/otf otf;
AddType font/otf .otf
res.set("Content-Type", "font/otf");import mimetypes
mimetypes.add_type("font/otf", ".otf")<input type="file" accept=".otf,font/otf">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.otf | grep -i '^content-type:' file --mime-type file.otf
Frequently asked questions
What is the MIME type for .otf files?
font/otf. You may also see application/x-font-opentype, but font/otf is the one to send.
What Content-Type header should a .otf file be served with?
Content-Type: font/otf. It compresses well, so let the server apply gzip or Brotli.
How can I tell if a file is really a .otf?
Check its bytes rather than the extension: OTF files start with 4F 54 54 4F (OTTO) — for CFF-based fonts; TrueType-flavoured OpenType starts 00 01 00 00. On the command line, file --mime-type name.otf does this for you.
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options