---
title: "text.replaceFont: Replace Font — Vector kit command — Kition"
description: "Replaces one font (family and optionally style) with another in all text or only the selection; answers runs changed."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/text.replaceFont"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/vector/commands/text.replaceFont](https://developer.kition.ai/docs/kits/vector/commands/text.replaceFont)

# text.replaceFont

**Replace Font.** Replaces one font (family and optionally style) with another in all text or only the selection; answers runs changed.

- Kit: Vector 0.1.0 (.kvector); reference: [Vector kit commands](https://developer.kition.ai/docs/kits/vector.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `family` | `string` | no | read by the command beside its listed parameters |
| `from` | `object` | no |  |
| `selectionOnly` | `boolean` | no |  |
| `style` | `string` | no | read by the command beside its listed parameters |
| `to` | `object` | no | any of its names; stored as the font's own family name |

## Call through vector_run

```text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "text.replaceFont" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `family`, `from`, `selectionOnly`, `style`, `to`. vector_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "family": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "from": {
      "additionalProperties": true,
      "properties": {
        "family": {
          "type": "string"
        },
        "style": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "selectionOnly": {
      "type": "boolean"
    },
    "style": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "to": {
      "additionalProperties": true,
      "description": "any of its names; stored as the font's own family name",
      "properties": {
        "family": {
          "type": "string"
        },
        "style": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "returns": "{runs}",
  "type": "object"
}
```

Generated from the command list of @kition/vector-darwin-arm64@0.1.0 and the kit itself (vector_commands through @kition/cli@0.1.1, built from KitionAI/kition-vector@7cf908f).
