Preserving Cubic PostScript CFF Outlines During WOFF-to-OTF Recovery
Cubic Type 2 Charstrings vs Quadratic TrueType Contours
Commercial editorial serifs and foundry families authored in Adobe InDesign or Glyphs workflows frequently store cubic Bezier curves inside a Compact Font Format (CFF or CFF2) table rather than TrueType glyf contours. When packaged for browsers as .woff or .woff2, both outline formats share the exact same webfont file extension, masking whether the underlying desktop structure is TrueType or OpenType CFF.
Bytes 4..7 of a WOFF or WOFF2 header preserve the authoritative 32-bit SFNT flavor signature: 0x4F54544F spells ASCII OTTO. Exporting an OTTO font with a .ttf filename confuses legacy Windows GDI installers and prepress RIP engines. Worse, tools that transcode cubic CFF curves into quadratic splines introduce mathematical approximation error and discard PostScript stem hinting.
- Extracts the original CFF table verbatim without lossy cubic-to-quadratic curve conversion.
- Enforces .otf output naming and font/otf MIME metadata whenever OTTO flavor is detected.
- Blocks accidental strict-.ttf export requests on CFF inputs with a deterministic FORMAT error.
- Retains Private Dict blueValues, stemSnap arrays, and subroutines inside CFF charstrings.