Font coverage: does this font have glyphs for this text, and does it fit the box
Reads a TrueType or OpenType font you supply as base64 (up to 2 MB) and a text of up to 5000 characters, for an agent about to render text in a fixed font: lists every code point with no glyph in the cmap (formats 4 and 12) and sums the hmtx advance widths to test a width in pixels. Every offset is bounds-checked. It does not apply kerning, ligatures or shaping (combining marks and complex scripts make the width check unknown), does not read WOFF, WOFF2 or font collections (unsupported), and does not render the font.
What you get
Catches the tofu boxes and overflowing labels before a design, PDF or image is generated with the wrong font.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/font-coverage. 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-coverage \
-H 'content-type: application/json' \
-d '{"fontBase64":"AAEAAAAFAAAAAAAAY21hcAAAAAAAAABcAAAARGhlYWQAAAAAAAAAoAAAADZoaGVhAAAAAAAAANgAAAAkaG10eAAAAAAAAAD8AAAAFG1heHAAAAAAAAABEAAAAAYAAAABAAMAAQAAAAwABAA4AAAACgAAAAAAAABBAEIAQwDp//8AAABBAEIAQwDp////wP/A/8D/GwABAAAAAAAAAAAAAAABAAAAAQAAAAAAAF8PPPUAAAPoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAMg/zgAWgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAfQAAAJYAAACvAAAAyAAAAImAAAAAFAAAAUAAA==","text":"ABC é","fontSizePx":10,"maxWidthPx":100}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
fontBase64 | string; length 8..2796204 | yes | Base64 of a .ttf or .otf file (sfnt, not WOFF). |
text | string; length 1..5000 | yes | |
fontSizePx | number; 1..2000 | no | Needed for a width check. |
maxWidthPx | number; 0..100000 | no | Box width; the widest line (split on \n) must fit. |
Example request body
{
"fontBase64": "AAEAAAAFAAAAAAAAY21hcAAAAAAAAABcAAAARGhlYWQAAAAAAAAAoAAAADZoaGVhAAAAAAAAANgAAAAkaG10eAAAAAAAAAD8AAAAFG1heHAAAAAAAAABEAAAAAYAAAABAAMAAQAAAAwABAA4AAAACgAAAAAAAABBAEIAQwDp//8AAABBAEIAQwDp////wP/A/8D/GwABAAAAAAAAAAAAAAABAAAAAQAAAAAAAF8PPPUAAAPoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAMg/zgAWgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAfQAAAJYAAACvAAAAyAAAAImAAAAAFAAAAUAAA==",
"text": "ABC é",
"fontSizePx": 10,
"maxWidthPx": 100
}
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. |
font | one of | no | |
requestedCodePoints | integer | no | Distinct non-newline code points in the text. |
coveredCodePoints | integer | no | |
missing | array<object> | no | |
missingTruncated | boolean | no | |
width | 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