evCreate API 5.7 Help

SetFont Function

Applies a given new text formatting to the characters given as a continuous range in a given text item from an Envision document currently opened in the Canvas Envision Creator app.

SetFont(obj: [[[EvItem|canvas-envision-document-items.html#object-items]]], font: [[[EvFontStyle|evfontstyle-interface.html]]], span?: [[[EvCharSpan|evcharspan-interface.html]]]): Promise<void>

Parameters

obj: EvItem

An Object item object, a given text item from the Envision document currently opened in the Canvas Envision Creator app with the given range of characters whose text formatting should be changed.

If a given object item is not a text, the function throws an error.

font: EvFontStyle

An EvFontStyle object, a given new text formatting that should be applied to the characters within the given range in the given text item.

span?: EvCharSpan

An EvCharSpan object, a given continuous range of characters whose text formatting should be changed.

The default value is the entire text in the given text item.

Return value

Promise<void>

A Promise that, if fulfilled, resolves to void if the given new text formatting has been successfully applied to the characters within the given range in the given text item in the current document.

17 April 2025