xtract.bot
POST /api/font-convert

Decompress a WOFF2 font into TTF/OTF. Useful when you have a WOFF2 file but need the original sfnt for tooling that does not understand the WOFF2 wrapper.

Decompresses a WOFF2 font and returns the original sfnt (TTF or OTF) bytes. Useful when you have a WOFF2 file but need an sfnt — most font tooling, foundries, OS-level installers, and older browsers expect TTF/OTF. The conversion is exact: the output is the same bytes the WOFF2 encoder originally compressed, so glyph metrics, kerning, and OpenType features all survive verbatim.

Inputs

NameTypeDefaultDescription
font*fileWeb font (WOFF / WOFF2) or SFNT (TTF / OTF) to convert.

Response

Modes: binary, base64-json. Cache: yes (24h TTL).

Code samples

Built from the decompress-woff2 example.

# Download or substitute the example input:
#   curl -O https://xtract.bot/examples/font-info/DejaVuSans.woff2
FONT=$(base64 -w0 < DejaVuSans.woff2)

curl -X POST https://api.xtract.bot/api/font-convert \
  -H "Content-Type: application/json" \
  -H "Accept: application/octet-stream" \
  -H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
  -H "X-Api-Key: $XTRACT_API_KEY" \
  -d '{
  "font": "'"$FONT"'"
}'