Font API Reference
kittl.font — upload custom fonts. This API has been available since SDK 0.0.1.
For font family and style management, see the Data API. That API was added in SDK 0.0.5.
createFont(params)
Uploads one or more font files as a font family.
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name for the font family |
files | Blob[] | Yes | Array of font file blobs (one per style) |
styles | string[] | Yes | Style name for each file (e.g. ['Regular', 'Bold', 'Italic']) — must match files in order and length |
previewImage | Blob | No | Preview image blob for the font family |
Returns SdkResultAsync<UploadedFontFamily, Error>:
| Property | Type | Description |
|---|---|---|
id | string | Unique font family ID |
name | string | Font family name |
fonts | UploadedFontStyle[] | Array of uploaded styles (each has id, name, style, objectName) |
preview | string? | Preview image URL (if provided) |
workspaceId | string? | Workspace associated with the font |
extension | { id: string; name?: string }? | Extension associated with the font |