Polotno
Design Format

Font

Documentation for the Font type in the Polotno design JSON Schema.

Type Information

Base Type: object

Properties

PropertyTypeDescription
fontFamilystringFont family name.
urlstringURL to load the font from (single-variant fonts).
stylesArray<FontStyleVariant>Per-weight/style variants for multi-variant families.

JSON Schema

{
  "type": "object",
  "properties": {
    "fontFamily": {
      "type": "string",
      "description": "Font family name."
    },
    "url": {
      "default": "",
      "description": "URL to load the font from (single-variant fonts).",
      "type": "string"
    },
    "styles": {
      "description": "Per-weight/style variants for multi-variant families.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "src": {
            "type": "string",
            "description": "Font source, typically in CSS url() form."
          },
          "fontStyle": {
            "type": "string"
          },
          "fontWeight": {
            "type": "string"
          }
        },
        "required": [
          "src"
        ]
      }
    }
  },
  "required": [
    "fontFamily"
  ]
}

On this page