Font formats compared: WOFF2, WOFF, TTF, OTF, CFF and PostScript Type 1

How desktop outline fonts (TrueType .ttf and OpenType .otf) differ from web font wrappers (.woff2 and .woff), how quadratic and cubic Bézier curves are stored, and how to test font pipelines.

1. Outline curves vs. packaging wrappers

When comparing font formats, separate the glyph outline mathematics from the outer file container:

  • TrueType outlines (.ttf): Store glyph contours inside a glyf table as 2nd-order (quadratic) Bézier splines with integer grid-fitting instructions (hinting bytecode). A raw TrueType file begins with the 4-byte sfnt version scalar 00 01 00 00 (or 74 72 75 65, ASCII true on classic Apple fonts).
  • OpenType CFF outlines (.otf and .cff): Store glyph contours inside a CFF (Compact Font Format) table as 3rd-order (cubic) PostScript Type 2 Bézier charstrings. An OpenType CFF file uses the exact same sfnt table directory structure as TTF, except its first 4 bytes are 4F 54 54 4F (ASCII OTTO).
  • Web Open Font Format 1.0 (.woff) and 2.0 (.woff2): Are not new outline formats—they wrap the exact same TrueType or OpenType tables for HTTP delivery. WOFF 1.0 (magic wOFF, 77 4F 46 46) compresses each table individually with zlib/DEFLATE. WOFF2 (magic wOF2, 77 4F 46 32) applies a preprocessing transform to the glyf and loca tables to strip redundant coordinate headers and compresses the entire font stream together with Brotli.
FormatMagic bytesCurve mathCompressionSample fixture
WOFF2 (.woff2)77 4F 46 32 ('wOF2')Quadratic (glyf) or Cubic (CFF)glyf transform + shared Brotlisample-font-web.woff2
WOFF 1.0 (.woff)77 4F 46 46 ('wOFF')Quadratic (glyf) or Cubic (CFF)Per-table zlib DEFLATEsample.woff
TrueType (.ttf)00 01 00 00Quadratic Bézier (glyf + loca)Uncompressed sfnt tablessample-font-regular.ttf
OpenType (.otf)4F 54 54 4F ('OTTO')Cubic Bézier (CFF table)Uncompressed sfnt + CFFsample.otf
CFF (.cff)01 00 04Cubic Type 2 charstringsCompact binary dictionarysample.cff
Type 1 PFB (.pfb)80 01 (+ '%!PS-AdobeFont')Cubic Type 1 charstringsBinary segment blockssample.pfb

2. Why Adobe retired PostScript Type 1 (.pfb / .pfa) in 2023

Legacy PostScript Type 1 fonts (.pfb) split a single typeface across multiple files (one .pfb outline file plus a separate .afm or .pfm metrics file), supported at most 256 encoded glyphs without complex composite mappings, and lacked unified Unicode cmap tables. Adobe Creative Cloud, PDF/A-4 workflows, and modern operating systems have deprecated Type 1 fonts in favor of OpenType (.otf / .ttf). Keep sample.pfb in your QA test suite specifically to verify that document converters detect and flag deprecated Type 1 font dependencies cleanly.

Related guides and test tools

Frequently asked questions

Can I convert a WOFF2 file back into an installable desktop TTF or OTF file?
Yes. Because WOFF2 is a lossless transform and Brotli wrapper around standard sfnt tables, decompressing sample-font-web.woff2 with fontTools or woff2_decompress reconstructs a valid desktop .ttf font.
What MIME types are standardized for web and desktop fonts?
RFC 8081 defines the top-level 'font/' media type registry: font/woff2, font/woff, font/ttf, font/otf, and font/collection (for .ttc).

Operational transparency, verification and developer reference

For technical questions or feedback regarding SampleTestFiles, contact contact@sjwebtechwork.com. Every sample file, dataset, and diagnostic utility on this site follows strict reproducibility and privacy rules: