font-face-css
@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
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>",
"sources": "<sources>"
},
"name": "font-face-css"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| family | No | Overrides the family name read from the font. | |
| sources | Yes | One entry per file you serve, best format first. | |
| fontBase64 | Yes | Base64 of a .ttf, .otf, .woff or .woff2 file (not a .ttc collection), up to 2 MB. | |
| fontDisplay | No | Default swap. | |
| includeUnicodeRange | No | Default true; omitted automatically for fonts with more than 300 cmap ranges. |