@font-face block generated from the font file: family, weight, style, stretch and unicode-range read from the font
Reads a font you supply as base64 (up to 2 MB, any of TTF, OTF, WOFF, WOFF2) and writes an @font-face rule for the URLs you will serve it from, for an agent or build step generating CSS: font-family from the name table, font-weight from OS/2 (or the fvar wght range of a variable font), font-style, font-stretch, and unicode-range from the cmap. Names and URLs are escaped as CSS strings. It does not host, convert or subset the font, does not check that your URLs serve the format you name, does not read collections (.ttc), and a font whose OS/2 fsType forbids embedding fails with no CSS.
What you get
A correct @font-face rule (including variable-font ranges and unicode-range) without hand-reading the name and OS/2 tables.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/font-face-css. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/font-face-css \
-H 'content-type: application/json' \
-d '{"fontBase64":"AAEAAAAJAAAAAAAAT1MvMgAAAAAAAACcAAAAYGNtYXAAAAAAAAAA/AAAADxnbHlmAAAAAAAAATgAAACEaGVhZAAAAAAAAAG8AAAANmhoZWEAAAAAAAAB9AAAACRobXR4AAAAAAAAAhgAAAAUbG9jYQAAAAAAAAIsAAAADG1heHAAAAAAAAACOAAAACBuYW1lAAAAAAAAAlgAAAEyAAQCWAGQAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQADAAEAAAAMAAQAMAAAAAgAAAAAAAAAQQBCAOn//wAAAEEAQgDp////wP/A/xsAAQAAAAAAAAAAAAEAZAAAA4QCvAACAAABAQEAZAGQAZAAAAK8/UQAAAAAAQAAAAADIAK8AAQAAAEBAAEAAAAAAAHCAV7+ogAAArwAAP6i/qIAAAEAAAAAAMgAZAACAAABAQEAAABkAGQAAABk/5wAAAD//wBkAAAETAMgACMAAQAAAAAAAwADAMgCvAAAAAEAAAABAAAAAAAAXw889QAAA+gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAyD/OABaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUB9AAAA+gAAAMgAAABLAAAA+gAAAAAAAAAEAAkADQAQgABAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgBOAAMAAQQJAAEAFAAAAAMAAQQJAAIADgAUAAMAAQQJAAQAJAAiAAMAAQQJAAYAIgBGAAMAAQQJAA0ARgBoAAMAAQQJAA4ANgCuAFMAeQBuAHQAaAAgAFMAYQBuAHMAUgBlAGcAdQBsAGEAcgBTAHkAbgB0AGgAIABTAGEAbgBzACAAUgBlAGcAdQBsAGEAcgBTAHkAbgB0AGgAUwBhAG4AcwAtAFIAZQBnAHUAbABhAHIAUwB5AG4AdABoAGUAdABpAGMAIAB0AGUAcwB0ACAAZgBvAG4AdAAsACAAcAB1AGIAbABpAGMAIABkAG8AbQBhAGkAbgAuAGgAdAB0AHAAcwA6AC8ALwBlAHgAYQBtAHAAbABlAC4AYwBvAG0ALwBsAGkAYwBlAG4AcwBlAAA=","sources":[{"url":"/fonts/synth-sans.woff2","format":"woff2"},{"url":"/fonts/synth-sans.woff","format":"woff"}]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
fontBase64 | string; length 8..2796204 | yes | Base64 of a .ttf, .otf, .woff or .woff2 file (not a .ttc collection), up to 2 MB. |
sources | array<object>; max 4 items | yes | One entry per file you serve, best format first. |
fontDisplay | string; one of "auto", "block", "swap", "fallback", "optional" | no | Default swap. |
family | string; length 1..200 | no | Overrides the family name read from the font. |
includeUnicodeRange | boolean | no | Default true; omitted automatically for fonts with more than 300 cmap ranges. |
Example request body
{
"fontBase64": "AAEAAAAJAAAAAAAAT1MvMgAAAAAAAACcAAAAYGNtYXAAAAAAAAAA/AAAADxnbHlmAAAAAAAAATgAAACEaGVhZAAAAAAAAAG8AAAANmhoZWEAAAAAAAAB9AAAACRobXR4AAAAAAAAAhgAAAAU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AAA=",
"sources": [
{
"url": "/fonts/synth-sans.woff2",
"format": "woff2"
},
{
"url": "/fonts/synth-sans.woff",
"format": "woff"
}
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
css | one of | no | |
family | one of | no | |
weight | one of | no | |
style | one of | no | |
stretch | one of | no | |
variable | boolean | no | True when the font has an fvar table. |
axes | array<object> | no | |
unicodeRange | one of | no | |
unicodeRangeCount | one of | no | |
licence | one of | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the identifier-text-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent