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