Test files › Fonts › qa-sans.woff2

Sample WOFF2 file (qa sans)

The same "QA Sans" font as WOFF2: every table concatenated into a single Brotli stream behind a WOFF2 header and a variable-length table directory.

↓ Download qa-sans.woff2
Filenameqa-sans.woff2
FormatWOFF2
Size456 bytes (456 bytes)
MIME typefont/woff2
SHA-256b317987f196d3143a3fc42d506b9700f49d4ccec2335910e4c220fa9013395ef
What this file catchesModern @font-face delivery. WOFF2 is the format browsers actually prefer, and it is structurally unlike WOFF 1.0: one Brotli stream over all tables rather than per-table compression, with UIntBase128 lengths. Decompresses and parses in fontTools.

Handle it in code

Each snippet below was run against this exact file with Python 3.14.4 and Node 24.15.0 when this page was built, and the output shown is what it printed.

Python

Check the signature and the table directory before handing a font to a renderer. TrueType and OpenType list their tables in a plain directory; WOFF wraps the same tables with zlib; WOFF2 compresses them with Brotli, which the standard library cannot read.

import struct

REQUIRED = {"cmap", "head", "hhea", "hmtx", "maxp", "name", "post"}

with open("qa-sans.woff2", "rb") as f:
    data = f.read()
sig = data[:4]
if sig == b"wOF2":
    n = struct.unpack(">H", data[12:14])[0]
    print(f"WOFF2 with {n} tables, Brotli-compressed: read further with fontTools")
elif sig in (b"wOFF", b"\x00\x01\x00\x00", b"true", b"OTTO"):
    if sig == b"wOFF":
        kind, n, start, step = "WOFF", struct.unpack(">H", data[12:14])[0], 44, 20
    else:
        kind = "OpenType (CFF)" if sig == b"OTTO" else "TrueType"
        n, start, step = struct.unpack(">H", data[4:6])[0], 12, 16
    tags = {data[start + i * step:start + i * step + 4].decode("latin-1") for i in range(n)}
    missing = sorted(REQUIRED - tags)
    print(f"{kind} with {n} tables: {', '.join(sorted(tags))}")
    print("missing required tables: " + ", ".join(missing) if missing else "all required tables present")
else:
    print("not a font: starts with", sig.hex())

Run against this file, it prints: WOFF2 with 10 tables, Brotli-compressed: read further with fontTools

Related guides and tools

Sample font files (TTF, WOFF, WOFF2)MIME typesCheck a file's real typeVerify its SHA-256

Download & verify

curl -fsSL -o "qa-sans.woff2" "https://files.hexaqa.com/font/qa-sans.woff2"
curl -fsSL "https://files.hexaqa.com/font/qa-sans.woff2" | sha256sum # expect: b317987f196d3143a3fc42d506b9700f49d4ccec2335910e4c220fa9013395ef

More fonts test files

qa-sans.ttfqa-sans.woff

← All Fonts files