TX Text Control .NET for WPF

GetSupportedFonts Method

Method|Introduced in 24.0
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.WPF.dll from the private NuGet feed or Text Control Offline Packages

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 property. The method returns null if the WPF.TextControl has not been completely initialized.

Syntax

public string[] GetSupportedFonts();

Examples

The following example retrieves supported fonts from the text control.

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