Font sample files: TrueType, OpenType, WOFF2, WOFF and PostScript
Download desktop and web font fixtures (.ttf, .otf, .woff2, .woff, .cff, .pfb, .ps, .sfd) to test @font-face CSS delivery, OpenType Sanitizer validation, PDF font subsetting, and FreeType/HarfBuzz rendering pipelines.
Font formats compared
Modern applications handle two distinct generations of font containers. Desktop publishing, operating-system font managers, and PDF generators consume uncompressed sfnt outline containers—TrueType (.ttf) with quadratic Bézier curves in a glyf table and OpenType (.otf) with cubic Bézier charstrings in a CFF table. Web browsers, by contrast, prioritize network transfer efficiency and consume WOFF2 (.woff2), which transforms the glyf and loca tables before compressing the entire font as a single Brotli stream.
| Format | MIME type | Signature bytes | Primary engineering use case | Reference & Download |
|---|---|---|---|---|
| TTF (TrueType) | font/ttf | 00 01 00 00 | Desktop OS installation, PDF/DOCX embedding, FreeType/Canvas rendering | TTF samples |
| WOFF2 (Web Font 2.0) | font/woff2 | 77 4F 46 32 ('wOF2') | Modern CSS @font-face delivery with Brotli compression | WOFF2 samples |
| OTF (OpenType CFF) | font/otf | 4F 54 54 4F ('OTTO') | PostScript Type 2 cubic Bézier desktop typography and print workflows | Download .otf |
| WOFF 1.0 | font/woff | 77 4F 46 46 ('wOFF') | Zlib-compressed sfnt web font container for legacy browser testing | Download .woff |
| CFF (Compact Font) | font/cff | 01 00 04 | Raw Adobe Type 2 charstring font table embedded inside PDFs and OTFs | Download .cff |
| PFB (Printer Font Binary) | application/x-font-type1 | 80 01 | Legacy Adobe Type 1 binary printer font with 0x8001 segment markers | Download .pfb |
| PS (PostScript) | application/postscript | 25 21 50 53 ('%!PS') | Page description language and Type 1/3 font dictionary testing | Download .ps |
| SFD (Spline Font DB) | application/vnd.font-fontforge-sfd | SplineFontDB: | FontForge plain-text spline source database for CI font build scripts | Download .sfd |
| DFONT (Mac Data-Fork) | application/x-dfont | 00 00 01 00 | Legacy Mac OS X resource-map suitcase (documented as unavailable) | View spec |
What to verify when testing font uploaders and CDNs
- OpenType Sanitizer (OTS) table integrity: Web browsers reject any TTF, OTF, WOFF, or WOFF2 file whose
head,hhea,hmtx,maxp,name,OS/2, orposttable checksum or byte length is invalid. Every downloadable font on this site is compiled withfontToolsso all table offsets and checksums validate cleanly. - CORS headers on cross-origin font CDNs: Per the CSS Fonts Module Level 4 specification, browsers enforce strict same-origin checks on
@font-faceURLs. Verify that your asset server returnsAccess-Control-Allow-Origin: *(or your origin domain) when serving.woff2and.ttffiles. - Avoiding double compression on WOFF2: Because WOFF2 already uses Brotli compression internally, applying gzip or Brotli at the HTTP layer wastes CPU cycles without shrinking the payload.
Read our detailed engineering walkthrough in Font formats compared: WOFF2, WOFF, TTF, OTF and PostScript.
Frequently asked questions
- Which font format should I use for testing modern web applications?
- Start with WOFF2 (/formats/woff2/) for CSS @font-face and CDN caching tests, and use TTF (/formats/ttf/) or OTF when testing server-side image rendering (Pillow/Cairo) or PDF generation.
- Do these sample fonts carry restrictive foundry licences?
- No. All sample fonts on SampleTestFiles are built programmatically from basic geometric outlines using fontTools and are dedicated to the public domain (CC0).
Engineering test checklist for font sample files: truetype, opentype, woff2, woff and postscript
When designing automated integration suites for fonts pipelines, QA engineers must validate three distinct layers: binary container framing, metadata extraction accuracy, and resource-bounded parsing under concurrent load.
| Verification layer | Target assertion for fonts | Recommended test fixture or tool |
|---|---|---|
| 1. Signature & MIME check | Confirm backend inspects leading magic bytes rather than trusting the client Content-Type header for fonts uploads | Magic-Byte File Inspector & Spoofed-Extension Fixtures |
| 2. Boundary byte sizes | Test minimum valid header size, 1 MB default proxy limit, 10 MB application ceiling, and 50 MB+ streaming transfers | Size Buckets (1 KB–1 GB) & In-Browser Generator |
| 3. Corrupt payload handling | Verify that truncated streams or malformed headers in fonts return HTTP 400/422 instead of crashing the worker | Broken-File QA Suite & errors-400.json |
| 4. Checksum reproducibility | Assert that round-trip storage in cloud object storage preserves the exact byte length and SHA-256 digest | SHA-256 Checksum Directory |
Common failure points in fonts ingestion workflows
- Buffering entire files in process memory: Node.js, Python, and Java services that read an entire uploaded fonts fixture into a contiguous heap buffer before checking its header signature risk Out-Of-Memory (OOM) terminations when concurrent users upload 20 MB to 100 MB files. Read the first 4,096 bytes from the stream to validate magic bytes before streaming the body to object storage.
- Character encoding and metadata sanitization: Filenames and embedded metadata fields inside fonts containers can contain precomposed (NFC) or decomposed (NFD) Unicode sequences, spaces, or missing extensions. Combine the format fixtures above with our edge-case filename samples and the A to Z Format Index to cover every parser branch.
- Cross-platform viewer and codec parity: A fonts file that opens on a developer's macOS laptop may fail inside a minimal Alpine or Debian Linux container if required shared libraries or font tables are absent. Test parser behavior inside your exact production container image during CI using the copy-ready recipes on CLI & CI Automation.