> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-nick-sd-2070-add-content-controls-namespace-to-doc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# format.fontFamily

> Set or clear the `fontFamily` inline run property on the target text range.

> Alpha: Document API is currently alpha and subject to breaking changes.

## Summary

Set or clear the `fontFamily` inline run property on the target text range.

* Operation ID: `format.fontFamily`
* API member path: `editor.doc.format.fontFamily(...)`
* Mutates document: `yes`
* Idempotency: `conditional`
* Supports tracked mode: `yes`
* Supports dry run: `yes`
* Deterministic target resolution: `yes`

## Expected result

Returns a TextMutationReceipt confirming the inline run property patch was applied to the target range.

## Input fields

| Field                | Type        | Required | Description        |                      |
| -------------------- | ----------- | -------- | ------------------ | -------------------- |
| `target`             | TextAddress | yes      | TextAddress        |                      |
| `target.blockId`     | string      | yes      |                    |                      |
| `target.kind`        | `"text"`    | yes      | Constant: `"text"` |                      |
| `target.range`       | Range       | yes      | Range              |                      |
| `target.range.end`   | integer     | yes      |                    |                      |
| `target.range.start` | integer     | yes      |                    |                      |
| `value`              | string \\   | null     | yes                | One of: string, null |

### Example request

```json theme={null}
{
  "target": {
    "blockId": "block-abc123",
    "kind": "text",
    "range": {
      "end": 10,
      "start": 0
    }
  },
  "value": "example"
}
```

## Output fields

### Variant 1 (resolution.requestedTarget.kind="text")

| Field                                    | Type                   | Required | Description            |
| ---------------------------------------- | ---------------------- | -------- | ---------------------- |
| `inserted`                               | EntityAddress\[]       | no       |                        |
| `removed`                                | EntityAddress\[]       | no       |                        |
| `resolution`                             | TextMutationResolution | yes      | TextMutationResolution |
| `resolution.range`                       | TextMutationRange      | yes      | TextMutationRange      |
| `resolution.range.from`                  | integer                | yes      |                        |
| `resolution.range.to`                    | integer                | yes      |                        |
| `resolution.requestedTarget`             | TextAddress            | no       | TextAddress            |
| `resolution.requestedTarget.blockId`     | string                 | no       |                        |
| `resolution.requestedTarget.kind`        | `"text"`               | no       | Constant: `"text"`     |
| `resolution.requestedTarget.range`       | Range                  | no       | Range                  |
| `resolution.requestedTarget.range.end`   | integer                | no       |                        |
| `resolution.requestedTarget.range.start` | integer                | no       |                        |
| `resolution.target`                      | TextAddress            | yes      | TextAddress            |
| `resolution.target.blockId`              | string                 | yes      |                        |
| `resolution.target.kind`                 | `"text"`               | yes      | Constant: `"text"`     |
| `resolution.target.range`                | Range                  | yes      | Range                  |
| `resolution.target.range.end`            | integer                | yes      |                        |
| `resolution.target.range.start`          | integer                | yes      |                        |
| `resolution.text`                        | string                 | yes      |                        |
| `success`                                | `true`                 | yes      | Constant: `true`       |
| `updated`                                | EntityAddress\[]       | no       |                        |

### Variant 2 (resolution.requestedTarget.kind="text")

| Field                                    | Type                   | Required | Description            |
| ---------------------------------------- | ---------------------- | -------- | ---------------------- |
| `failure`                                | object                 | yes      |                        |
| `failure.code`                           | enum                   | yes      | `"INVALID_TARGET"`     |
| `failure.details`                        | any                    | no       |                        |
| `failure.message`                        | string                 | yes      |                        |
| `resolution`                             | TextMutationResolution | yes      | TextMutationResolution |
| `resolution.range`                       | TextMutationRange      | yes      | TextMutationRange      |
| `resolution.range.from`                  | integer                | yes      |                        |
| `resolution.range.to`                    | integer                | yes      |                        |
| `resolution.requestedTarget`             | TextAddress            | no       | TextAddress            |
| `resolution.requestedTarget.blockId`     | string                 | no       |                        |
| `resolution.requestedTarget.kind`        | `"text"`               | no       | Constant: `"text"`     |
| `resolution.requestedTarget.range`       | Range                  | no       | Range                  |
| `resolution.requestedTarget.range.end`   | integer                | no       |                        |
| `resolution.requestedTarget.range.start` | integer                | no       |                        |
| `resolution.target`                      | TextAddress            | yes      | TextAddress            |
| `resolution.target.blockId`              | string                 | yes      |                        |
| `resolution.target.kind`                 | `"text"`               | yes      | Constant: `"text"`     |
| `resolution.target.range`                | Range                  | yes      | Range                  |
| `resolution.target.range.end`            | integer                | yes      |                        |
| `resolution.target.range.start`          | integer                | yes      |                        |
| `resolution.text`                        | string                 | yes      |                        |
| `success`                                | `false`                | yes      | Constant: `false`      |

### Example response

```json theme={null}
{
  "inserted": [
    {
      "entityId": "entity-789",
      "entityType": "comment",
      "kind": "entity"
    }
  ],
  "resolution": {
    "range": {
      "from": 0,
      "to": 10
    },
    "requestedTarget": {
      "blockId": "block-abc123",
      "kind": "text",
      "range": {
        "end": 10,
        "start": 0
      }
    },
    "target": {
      "blockId": "block-abc123",
      "kind": "text",
      "range": {
        "end": 10,
        "start": 0
      }
    },
    "text": "Hello, world."
  },
  "success": true,
  "updated": [
    {
      "entityId": "entity-789",
      "entityType": "comment",
      "kind": "entity"
    }
  ]
}
```

## Pre-apply throws

* `TARGET_NOT_FOUND`
* `CAPABILITY_UNAVAILABLE`
* `INVALID_TARGET`
* `INVALID_INPUT`

## Non-applied failure codes

* `INVALID_TARGET`

## Raw schemas

<Accordion title="Raw input schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "target": {
        "$ref": "#/$defs/TextAddress"
      },
      "value": {
        "oneOf": [
          {
            "minLength": 1,
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "target",
      "value"
    ],
    "type": "object"
  }
  ```
</Accordion>

<Accordion title="Raw output schema">
  ```json theme={null}
  {
    "oneOf": [
      {
        "$ref": "#/$defs/TextMutationSuccess"
      },
      {
        "additionalProperties": false,
        "properties": {
          "failure": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "enum": [
                  "INVALID_TARGET"
                ]
              },
              "details": {},
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "resolution": {
            "$ref": "#/$defs/TextMutationResolution"
          },
          "success": {
            "const": false
          }
        },
        "required": [
          "success",
          "failure",
          "resolution"
        ],
        "type": "object"
      }
    ]
  }
  ```
</Accordion>

<Accordion title="Raw success schema">
  ```json theme={null}
  {
    "$ref": "#/$defs/TextMutationSuccess"
  }
  ```
</Accordion>

<Accordion title="Raw failure schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "failure": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "enum": [
              "INVALID_TARGET"
            ]
          },
          "details": {},
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "resolution": {
        "$ref": "#/$defs/TextMutationResolution"
      },
      "success": {
        "const": false
      }
    },
    "required": [
      "success",
      "failure",
      "resolution"
    ],
    "type": "object"
  }
  ```
</Accordion>
