DS Server

Javascript: InputFormat.getSupportedFontFamilies Method

Method|Introduced in 28.0

Description

Returns an array of strings specifying all supported fonts.

Syntax

<void> InputFormat.getSupportedFontFamilies(<RequestStringsCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

The callback function that receives the requested value.

errorCallback

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

Examples

The following example demonstrates InputFormat.getSupportedFontFamilies in a practical document-editing workflow. It returns an array of strings specifying all supported fonts.

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

TXTextControl.inputFormat.getSupportedFontFamilies(
    function(result) {
        console.log("get supported font families result:", result);
    },
    onTxError
);