TX Text Control .NET Server

Javascript: FormattingStyle.getCharacterScaling Method

Method|Introduced in 30.0

Description

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

Syntax

<void> FormattingStyle.getCharacterScaling([<RequestNumberCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
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.getCharacterScaling in a practical document-editing workflow. It gets 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 inspectCharacterScaling(formattingStyle) {
    formattingStyle.getCharacterScaling(
        function(result) {
            console.log("get character scaling result:", result);
        },
        onTxError
    );
}