Javascript: FormattingStyle.setCharacterScaling Method
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
| Parameter | Description |
|---|---|
| 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
);
}