Font coverage: does this font have glyphs for this text, and does it fit the box

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/font-coverage · Id font-coverage

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

FieldTypeRequiredDescription
fontBase64string; length 8..2796204yesBase64 of a .ttf or .otf file (sfnt, not WOFF).
textstring; length 1..5000yes
fontSizePxnumber; 1..2000noNeeded for a width check.
maxWidthPxnumber; 0..100000noBox 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.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: 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.
fontone ofno
requestedCodePointsintegernoDistinct non-newline code points in the text.
coveredCodePointsintegerno
missingarray<object>no
missingTruncatedbooleanno
widthone ofno
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways 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