# FontName Property

> Returns or sets the font name of the selected or complete TXTextControl text, depending on FormatSelection; an empty string means the selection mixes fonts.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > FontName Property
- **248 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontname-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontname-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontname-property/llms-full.txt

---

Returns or sets the font used to display text. At design time this property changes or gets the font name of the complete text. At runtime this property determines the font of the selected text when the [FormatSelection](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formatselection-property/llms-full.txt) property has been set to True. When the [FormatSelection](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formatselection-property/llms-full.txt) property has been set to False the font of the complete text is set or returned.

### Syntax

```vbscript
TXTextControl.FontName [= string]
```

### Data Types

String.

### Remarks

The property returns an empty string if the selected text contains different fonts. This can happen only at runtime and when the [FormatSelection](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formatselection-property/llms-full.txt) property has been set to True.

### See Also

- [FontDialog Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontdialog-method/llms-full.txt)
- [FormatSelection Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formatselection-property/llms-full.txt)
- [Programming Category: Character Formatting](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/character-formatting/llms-full.txt)

---

## Nearby

- **Previous:** [FontItalic Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontitalic-property/llms-full.txt)
- **Next:** [FontSettings Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fontsettings-property/llms-full.txt)
