TX Text Control .NET for Windows Forms

GetSupportedFonts Method

Method|Introduced in 15.1
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.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 TextControl.FormattingPrinter property. The method returns null, if the 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);
}