TX Text Control .NET for Windows Forms

FontSettings Class

Class|Introduced in 15.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.

Description

The FontSettings class provides settings determining which fonts can be used in a document.

Syntax

public class FontSettings

Examples

The following example configures font settings for the current document.

FontSettings fontSettings = textControl.FontSettings;
fontSettings.TrueTypeFontsOnly = true;

Members

Constructors

ConstructorDescription
FontSettingsNot described in the reference. public FontSettings();

Properties

PropertyDescription
AdaptFontEventSpecifies whether a TextControl.AdaptFont event is raised, if a font must be adapted. The default setting of this property is false.
EmbeddableFontsOnlyGets or sets a value specifying that only embeddable fonts can be used in a document. Embeddable fonts may be stored in a document without violating its font embedding licensing rights. When a document with embedded fonts is opened on a system that does not have the font installed, the embedded font may be loaded for temporary use on that system. TX Text Control allows only OpenType and TrueType fonts to be embeddable. This property must be set to true, if a document is to be saved in Adobe PDF/A format. The default setting of this property is false.
ScalableFontsOnlyGets or sets a value specifying that only free scalable fonts can be used in a document. The default setting of this property is false.
TrueTypeFontsOnlyGets or sets a value specifying that only TrueType and OpenType fonts can be used in a document. The default setting of this property is false.