MogrtText

Since: 27.0

Constructor

Construct a MogrtText with a single empty text run.

Since: 27.0

Instance Methods

getAllCaps

Get all caps. Throws if isUniformStyling() is false (mixed styling); check isUniformStyling() before calling.

Since: 27.0

Returns: boolean

getFauxBold

Get faux bold. Throws if isUniformStyling() is false (mixed styling); check isUniformStyling() before calling.

Since: 27.0

Returns: boolean

getFauxItalic

Get faux italic. Throws if isUniformStyling() is false (mixed styling); check isUniformStyling() before calling.

Since: 27.0

Returns: boolean

getFontName

Get font name. Throws if isUniformStyling() is false (mixed styling); check isUniformStyling() before calling.

Since: 27.0

Returns: string

getFontSize

Get font size. Throws if isUniformStyling() is false (mixed styling); check isUniformStyling() before calling.

Since: 27.0

Returns: number

getSmallCaps

Get small caps. Throws if isUniformStyling() is false (mixed styling); check isUniformStyling() before calling.

Since: 27.0

Returns: boolean

getText

Get the text content.

Since: 27.0

Returns: string

isFauxStylesEditable

Returns whether faux styles can be edited for this text parameter. Returns true for user-constructed instances (no author restrictions apply).

Since: 27.0

Returns: boolean

isFontNameEditable

Returns whether the font name can be edited for this text parameter. Returns true for user-constructed instances (no author restrictions apply).

Since: 27.0

Returns: boolean

isFontSizeEditable

Returns whether the font size can be edited for this text parameter. Returns true for user-constructed instances (no author restrictions apply).

Since: 27.0

Returns: boolean

isUniformStyling

Returns true when all text shares a single uniform style (exactly one text run).

Since: 27.0

Returns: boolean

setAllCaps

Set all caps across all runs. Throws if isFauxStylesEditable() is false.

Since: 27.0

Returns: boolean

Parameters

Name
Type
Description
inAllCaps
boolean
-

setFauxBold

Set faux bold across all runs. Throws if isFauxStylesEditable() is false.

Since: 27.0

Returns: boolean

Parameters

Name
Type
Description
inFauxBold
boolean
-

setFauxItalic

Set faux italic across all runs. Throws if isFauxStylesEditable() is false.

Since: 27.0

Returns: boolean

Parameters

Name
Type
Description
inFauxItalic
boolean
-

setFontName

Set font name across all runs. Throws if isFontNameEditable() is false.

Since: 27.0

Returns: boolean

Parameters

Name
Type
Description
inFontName
string
-

setFontSize

Set font size across all runs. Throws if isFontSizeEditable() is false.

Since: 27.0

Returns: boolean

Parameters

Name
Type
Description
inFontSize
number
-

setSmallCaps

Set small caps across all runs. Throws if isFauxStylesEditable() is false.

Since: 27.0

Returns: boolean

Parameters

Name
Type
Description
inSmallCaps
boolean
-

setText

Set the text content. Collapses any multi-run styling to a single run.

Since: 27.0

Returns: boolean

Parameters

Name
Type
Description
inText
string
-