# InputFormat.GetFontFamilies Method

> Returns an array of strings specifying all supported fonts. These fonts depend on the formatting device set with the WPF.TextControl.FormattingPrinter or TextControl.FormattingPrinter property and on attributes set with the WPF.TextControl.FontSettings or TextControl.FontSettings property.

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

---

### Description

Returns an array of strings specifying all 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) or [TextControl.FormattingPrinter](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/formattingprinter-property/llms-full.txt) property and on attributes set with the [WPF.TextControl.FontSettings](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/fontsettings-property/llms-full.txt) or [TextControl.FontSettings](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/fontsettings-property/llms-full.txt) property.

### Syntax

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

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

### Return Value

The return value is the list of available fonts.

### Examples

The following XAML example shows how to bind a combo box to the [FontFamily](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inputformat/fontfamily-property/llms-full.txt) property using GetFontFamilies to fill the combo box with available font names.

```plaintext
<ComboBox
    Name="cbFontFamily"
    IsEditable="True"
    IsReadOnly="True"
    Width="150"
    DropDownOpened="cbFontFamily_DropDownOpened"
    Text="{Binding ElementName=textControl1, Path=InputFormat.FontFamily}" />
```

```csharp
private void cbFontFamily_DropDownOpened(object sender, EventArgs e) {
    cbFontFamily.ItemsSource = textControl1.InputFormat.GetFontFamilies();
}
```

```vbnet
Private Sub cbFontFamily_DropDownOpened(sender As Object, e As EventArgs)
    cbFontFamily.ItemsSource = textControl1.InputFormat.GetFontFamilies()
End Sub
```

The following example changes the formatting applied to text entered at the end of a document by using `InputFormat.GetFontFamilies`.

```csharp
textControl.Text = "Project summary";
textControl.InputPosition = new InputPosition(textControl.Text.Length);
InputFormat inputFormat = textControl.InputFormat;

string[] results = inputFormat.GetFontFamilies();
foreach (string text in results)
{
    Console.WriteLine(text);
}
```

```vbnet
textControl.Text = "Project summary"
textControl.InputPosition = New InputPosition(textControl.Text.Length)
Dim inputFormat As InputFormat = textControl.InputFormat

Dim results As String() = inputFormat.GetFontFamilies()
For Each text As String In results
    Console.WriteLine(text)
Next
```

---

## Nearby

- **Previous:** [InputFormat.FrameLineWidth Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inputformat/framelinewidth-property/llms-full.txt)
- **Next:** [InputFormat.GetFontSizes Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inputformat/getfontsizes-method/llms-full.txt)
