TX Text Control .NET Server

Javascript: FormattingStyle.setFontName Method

Method|Introduced in 28.0

Description

Sets the font of the style.

Syntax

<void> FormattingStyle.setFontName(<String> fontName, <EmptyRequestCallback> callback)

Parameters

ParameterDescription
fontName

The font's name of the style.

callback

Is called when the operation completed.

Examples

The following example demonstrates FormattingStyle.setFontName in a practical document-editing workflow. It sets the font of the style.

function configureFontName(formattingStyle) {
    formattingStyle.setFontName(
        "Arial",
        function() {
            console.log("set font name completed.");
        }
    );
}