xtract.bot
POST /api/font-info

Inspect a TTF, OTF, WOFF, or WOFF2 font. Returns family, full name, weight class, glyph count, ascender/descender, license, and supported Unicode codepoints.

Parses a font file and returns its human-facing metadata: family name, full name, PostScript name, version string, license, weight class, italic flag, glyph count, plus the common metric tables (ascender, descender, units-per-em). Supported formats: TTF, OTF, WOFF, and WOFF2. WOFF and WOFF2 are detected by their magic header and decompressed transparently — no client-side step required. Set `includeCharacters: true` to also receive the full list of supported Unicode codepoints and a compact `U+XXXX-U+YYYY` range string.

Inputs

NameTypeDefaultDescription
font*fileTTF, OTF, WOFF, or WOFF2 font.
includeCharactersbooleanfalseInclude the full set of supported Unicode code points in the result (codepoints array, characterRanges in U+ notation, characterCount).

Response

Modes: json. Cache: yes (24h TTL).

Code samples

Built from the deja-vu example.

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

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