Font info
Try it interactively →POST /api/font-infoInspect a TTF, OTF, WOFF, or WOFF2 font. Returns family, full name, weight class, glyph count, ascender/descender, license, and supported Unicode codepoints.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| font* | file | — | TTF, OTF, WOFF, or WOFF2 font. |
| includeCharacters | boolean | false | Include 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"'"
}'