# Javascript: Selection.growFont Method

> Increases the font size of each font contained in the current text selection.If no text is selected, this method increases the font size at the text input position.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: Selection.growFont Method
- **333 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/selection/growfont-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/selection/growfont-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/selection/growfont-method/llms-full.txt

---

### Description

Increases the font size of each font contained in the current text selection.If no text is selected, this method increases the font size at the text input position.

### Syntax

```javascript
<void> Selection.growFont([<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `Selection.growFont` in a practical document-editing workflow. Increases the font size of each font contained in the current text selection.If no text is selected, this method increases the font size at the text input position.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.selection.growFont(
    function() {
        console.log("grow font completed.");
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: Selection.getUnderline Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/selection/getunderline-method/llms-full.txt)
- **Next:** [Javascript: Selection.increaseIndent Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/selection/increaseindent-method/llms-full.txt)
