# Javascript: FormattingStyle.getFontName Method

> Gets the font of the style.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: FormattingStyle.getFontName Method
- **238 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/formattingstyle/getfontname-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/formattingstyle/getfontname-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/formattingstyle/getfontname-method/llms-full.txt

---

### Description

Gets the font of the style.

### Syntax

```javascript
<void> FormattingStyle.getFontName(<RequestStringCallback> callback)
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the font of the style. |

### Examples

The following example demonstrates `FormattingStyle.getFontName` in a practical document-editing workflow. It gets the font of the style.

```javascript
function inspectFontName(formattingStyle) {
    formattingStyle.getFontName(
        function(result) {
            console.log("get font name result:", result);
        }
    );
}
```

---

## Nearby

- **Previous:** [Javascript: FormattingStyle.getCulture Method](https://docs.textcontrol.com/ds-server/reference/javascript/formattingstyle/getculture-method/llms-full.txt)
- **Next:** [Javascript: FormattingStyle.getFontSize Method](https://docs.textcontrol.com/ds-server/reference/javascript/formattingstyle/getfontsize-method/llms-full.txt)
