TX Text Control .NET Server

Javascript: FormattingStyle.setCharacterScaling Method

Method|Introduced in 30.0

Description

Sets or sets the style's character scaling, in percent of the average character width.

Syntax

<void> FormattingStyle.setCharacterScaling(<number> characterScaling, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
characterScaling

The new value.

callback

Optional. Is called when the operation completed.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates FormattingStyle.setCharacterScaling in a practical document-editing workflow. It sets or sets the style's character scaling, in percent of the average character width.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function configureCharacterScaling(formattingStyle) {
    formattingStyle.setCharacterScaling(
        80,
        function() {
            console.log("set character scaling completed.");
        },
        onTxError
    );
}