AdaptFont Event
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. dll
Description
Occurs for each font that must be adapted, because it is not supported. The event can occur if another printer is set with the ServerTextControl.FormattingPrinter property, if a document is loaded that contains a font which is not supported or if fonts have been restricted with the FontSettings.EmbeddableFontsOnly or the FontSettings.TrueTypeFontsOnly property. The event occurs only, if the FontSettings.AdaptFontEvent property has been set to true. The event handler receives an argument of type AdaptFontEventArgs containing data related to this event.
Syntax
public event AdaptFontEventHandler AdaptFont;Public Event AdaptFont As AdaptFontEventHandlerExamples
The following example records useful context when adapt font occurs.
textControl.AdaptFont += (sender, e) =>
{
Console.WriteLine($"Font Name: {e.FontName}");
};AddHandler textControl.AdaptFont,
Sub(sender, e)
Console.WriteLine($"Font Name: {e.FontName}")
End Sub