# TextControl.GetSupportedFonts Method

> Gets an array of strings specifying the names of all currently supported fonts. These fonts depend on the formatting device set with the WPF.TextControl.FormattingPrinter property. The method returns null if the WPF.TextControl has not been completely initialized.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > TextControl.GetSupportedFonts Method
- **430 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getsupportedfonts-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getsupportedfonts-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getsupportedfonts-method/llms-full.txt

---

### Description

Gets an array of strings specifying the names of all currently supported fonts. These fonts depend on the formatting device set with the [WPF.TextControl.FormattingPrinter](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/formattingprinter-property/llms-full.txt) property. The method returns null if the [WPF.TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/llms-full.txt) has not been completely initialized.

### Syntax

```csharp
public string[] GetSupportedFonts();
```

```vbnet
Public Function GetSupportedFonts() As String()
```

### Examples

The following example retrieves supported fonts from the text control.

```csharp
string[] results = textControl.GetSupportedFonts();
foreach (string text in results)
{
    Console.WriteLine(text);
}
```

```vbnet
Dim results As String() = textControl.GetSupportedFonts()
For Each text As String In results
    Console.WriteLine(text)
Next
```

---

## Nearby

- **Previous:** [TextControl.GetPages Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getpages-property/llms-full.txt)
- **Next:** [TextControl.GetSupportedPaperSizes Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getsupportedpapersizes-method/llms-full.txt)
