# Javascript: TXTextControl.getSupportedFonts Method

> Gets an array of strings specifying the names of all currently supported fonts.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.getSupportedFonts Method
- **309 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/getsupportedfonts-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/getsupportedfonts-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/getsupportedfonts-method/llms-full.txt

---

### Description

Gets an array of strings specifying the names of all currently supported fonts.

### Syntax

```javascript
<void> TXTextControl.getSupportedFonts(<RequestStringsCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the currently supported fonts. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TXTextControl.getSupportedFonts` in a practical document-editing workflow. It gets an array of strings specifying the names of all currently supported fonts.

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

TXTextControl.getSupportedFonts(
    function(result) {
        console.log("get supported fonts result:", result);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.getSubTextParts Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/getsubtextparts-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.getSupportedPaperSizes Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/getsupportedpapersizes-method/llms-full.txt)
