font-coverage
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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fontBase64": "<fontBase64>",
"text": "<text>"
},
"name": "font-coverage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| fontBase64 | Yes | Base64 of a .ttf or .otf file (sfnt, not WOFF). | |
| fontSizePx | No | Needed for a width check. | |
| maxWidthPx | No | Box width; the widest line (split on \n) must fit. |