CharacterStyle

A character style.

Properties

Property Type Access Description
appliedFont any r/w The font applied to the text, specified as either a font object or the name of font family. Can return: Font, String or NothingEnum enumerator.
appliedLanguage any r/w The language of the text. Can return: LanguageWithVendors, Language or NothingEnum enumerator. Can also accept: String.
basedOn any r/w The object that the CharacterStyle is based on. Can return: CharacterStyle, String or NothingEnum enumerator.
baselineShift any r/w The baseline shift applied to the text. Can return: Unit or NothingEnum enumerator.
capitalization any r/w The capitalization scheme. Can return: Capitalization enumerator or NothingEnum enumerator.
fillColor any r/w The swatch (color, gradient, tint, or mixed ink) applied to the fill of the CharacterStyle. . Can return: Swatch or NothingEnum enumerator. Can also accept: String.
fillTint any r/w The tint (as a percentage) of the fill color of the CharacterStyle. (To specify a tint percentage, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.). Can return: Real or NothingEnum enumerator.
fontStyle any r/w The name of the font style. Can return: String or NothingEnum enumerator.
gradientFillAngle any r/w The angle of a linear gradient applied to the fill of the CharacterStyle. (Range: -180 to 180). Can return: Real or NothingEnum enumerator.
gradientFillLength any r/w The length (for a linear gradient) or radius (for a radial gradient) applied to the fill of the CharacterStyle. Can return: Real or NothingEnum enumerator.
gradientFillStart any r/w The starting point (in page coordinates) of a gradient applied to the fill of the CharacterStyle, in the format [x, y]. Can return: Array of 2 Units or NothingEnum enumerator.
gradientStrokeAngle any r/w The angle of a linear gradient applied to the stroke of the CharacterStyle. (Range: -180 to 180). Can return: Real or NothingEnum enumerator.
gradientStrokeLength any r/w The length (for a linear gradient) or radius (for a radial gradient) applied to the stroke of the CharacterStyle. Can return: Real or NothingEnum enumerator.
gradientStrokeStart any r/w The starting point (in page coordinates) of a gradient applied to the stroke of the CharacterStyle, in the format [x, y]. Can return: Array of 2 Units or NothingEnum enumerator.
horizontalScale any r/w The horizontal scaling applied to the text as a percentage of its current size. (Range: 1 to 1000). Can return: Real or NothingEnum enumerator.
id any readonly The unique ID of the CharacterStyle. Can return: Long Integer or NothingEnum enumerator.
imported any readonly If true, the style was imported from another document. Can return: Boolean or NothingEnum enumerator.
index any readonly The index of the CharacterStyle within its containing object. Can return: Long Integer or NothingEnum enumerator.
kerningMethod any r/w The type of pair kerning. Can return: String or NothingEnum enumerator.
label any r/w A property that can be set to any string. Can return: String or NothingEnum enumerator.
leading any r/w The leading applied to the text. Can return: Unit, Leading enumerator or NothingEnum enumerator.
ligatures any r/w If true, replaces specific character combinations (e.g., fl, fi) with ligature characters. Can return: Boolean or NothingEnum enumerator.
name any r/w The name of the CharacterStyle. Can return: String or NothingEnum enumerator.
noBreak any r/w If true, keeps the text on the same line. . Can return: Boolean or NothingEnum enumerator.
otfContextualAlternate any r/w If true, uses contextual alternate forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfDiscretionaryLigature any r/w If true, uses discretionary ligatures in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfFigureStyle any r/w The figure style in OpenType fonts. Can return: OTFFigureStyle enumerator or NothingEnum enumerator.
otfFraction any r/w If true, uses fractions in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfHistorical any r/w If true, use historical forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfLocale any r/w If true, uses localized forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfMark any r/w If true, uses mark positioning in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfOrdinal any r/w If true, uses ordinals in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfSlashedZero any r/w If true, use a slashed zeroes in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfStylisticSets any r/w The stylistic sets to use in OpenType fonts. Can return: Long Integer or NothingEnum enumerator.
otfSwash any r/w If true, uses swash forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfTitling any r/w If true, uses titling forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
overprintFill any r/w If true, the fill color of the characters will overprint. Can return: Boolean or NothingEnum enumerator.
overprintStroke any r/w If true, the stroke of the characters will overprint. Can return: Boolean or NothingEnum enumerator.
parent any readonly The parent of the CharacterStyle (a Document, Application or CharacterStyleGroup).
pointSize any r/w The text size. Can return: Unit or NothingEnum enumerator.
position any r/w The text position relative to the baseline. Can return: Position enumerator or NothingEnum enumerator.
positionalForm any r/w The OpenType positional form. Can return: PositionalForms enumerator or NothingEnum enumerator.
properties Object r/w A property that allows setting of several properties at the same time.
skew any r/w The skew angle of the text. (Range: -85 to 85). Can return: Real or NothingEnum enumerator.
strikeThroughColor any r/w The swatch (color, gradient, tint, or mixed ink) applied to the strikethrough stroke. Can return: Swatch, String or NothingEnum enumerator.
strikeThroughGapColor any r/w The swatch (color, gradient, tint, or mixed ink) applied to the gap of the strikethrough stroke. Can return: Swatch, String or NothingEnum enumerator.
strikeThroughGapOverprint any r/w If true, the gap color of the strikethrough stroke will overprint. Note: Valid when strike through type is not solid. Can return: Boolean or NothingEnum enumerator.
strikeThroughGapTint any r/w The tint (as a percentage) of the strikethrough stroke gap color. (Range: 0 to 100) Note: Valid when strike through type is not solid. Can return: Real or NothingEnum enumerator.
strikeThroughOffset any r/w The amount by which to offset the strikethrough stroke from the text baseline. Can return: Unit or NothingEnum enumerator.
strikeThroughOverprint any r/w If true, the strikethrough stroke will overprint. Can return: Boolean or NothingEnum enumerator.
strikeThroughTint any r/w The tint (as a percentage) of the strikethrough stroke. (Range: 0 to 100). Can return: Real or NothingEnum enumerator.
strikeThroughType any r/w The stroke type of the strikethrough stroke. Can return: StrokeStyle, String or NothingEnum enumerator.
strikeThroughWeight any r/w The stroke weight of the strikethrough stroke. Can return: Unit or NothingEnum enumerator.
strikeThru any r/w If true, draws a strikethrough line through the text. Can return: Boolean or NothingEnum enumerator.
strokeColor any r/w The swatch (color, gradient, tint, or mixed ink) applied to the stroke of the CharacterStyle. Can return: Swatch or NothingEnum enumerator. Can also accept: String.
strokeTint any r/w The tint (as a percentage) of the stroke color of the CharacterStyle. (To specify a tint percentage, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.). Can return: Real or NothingEnum enumerator.
strokeWeight any r/w The stroke weight applied to the characters of the text. Can return: Unit or NothingEnum enumerator.
tracking any r/w The amount by which to loosen or tighten a block of text, specified in thousands of an em. Can return: Real or NothingEnum enumerator.
underline any r/w If true, underlines the text. Can return: Boolean or NothingEnum enumerator.
underlineColor any r/w The swatch (color, gradient, tint, or mixed ink) applied to the underline stroke. . Can return: Swatch, String or NothingEnum enumerator.
underlineGapColor any r/w The swatch (color, gradient, tint, or mixed ink) applied to the gap of the underline stroke. Note: Valid when underline type is not solid. Can return: Swatch, String or NothingEnum enumerator.
underlineGapOverprint any r/w If true, the gap color of the underline stroke will overprint. Can return: Boolean or NothingEnum enumerator.
underlineGapTint any r/w The tint (as a percentage) of the gap color of the underline stroke. (Range: 0 to 100) Note: Valid when underline type is not solid. Can return: Real or NothingEnum enumerator.
underlineOffset any r/w The amount by which to offset the underline from the text baseline. Can return: Unit or NothingEnum enumerator.
underlineOverprint any r/w If true, the underline stroke color will overprint. Can return: Boolean or NothingEnum enumerator.
underlineTint any r/w The underline stroke tint (as a percentage). (Range: 0 to 100). Can return: Real or NothingEnum enumerator.
underlineType any r/w The stroke type of the underline stroke. Can return: StrokeStyle, String or NothingEnum enumerator.
underlineWeight any r/w The stroke weight of the underline stroke. Can return: Unit or NothingEnum enumerator.
verticalScale any r/w The vertical scaling applied to the text as a percentage of its current size. (Range: 1 to 1000). Can return: Real or NothingEnum enumerator.

Methods

CharacterStyle duplicate ()
Duplicates the CharacterStyle.

string extractLabel (key: string)
Gets the label value associated with the specified key.

Parameter Type Description
key string The key.

Array of CharacterStyle getElements ()
Resolves the object specifier, creating an array of object references.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

Parameter Type Description
key string The key.
value string The value.

CharacterStyle move (to: LocationOptions[, reference: any])
Moves the CharacterStyle to the specified location.

Parameter Type Description
to LocationOptions :
BEFORE
AFTER
AT_END
AT_BEGINNING
UNKNOWN
The location relative to the reference object or within the containing object.
reference ParagraphStyle
ParagraphStyleGroup
CharacterStyle
CharacterStyleGroup
CellStyle
CellStyleGroup
TableStyle
TableStyleGroup
Document
Application
The reference object. Note: Required when the to parameter specifies before or after. Can accept: ParagraphStyle, ParagraphStyleGroup, CharacterStyle, CharacterStyleGroup, CellStyle, CellStyleGroup, TableStyle, TableStyleGroup, Document or Application. (Optional)

void remove ([replacingWith: CharacterStyle])
Deletes the CharacterStyle.

Parameter Type Description
replacingWith CharacterStyle The CharacterStyle to apply in place of the deleted CharacterStyle. (Optional)

string toSource ()
Generates a string which, if executed, will return the CharacterStyle.

string toSpecifier ()
Retrieves the object specifier.

Element of:

Application.allCharacterStyles
Character.appliedCharacterStyle
Character.appliedNestedStyle
Character.dropCapStyle
CharacterStyleGroup.allCharacterStyles
Document.allCharacterStyles
FootnoteOption.footnoteMarkerStyle
IndexOptions.crossReferenceStyle
IndexOptions.crossReferenceTopicStyle
IndexOptions.pageNumberStyle
InsertionPoint.appliedCharacterStyle
InsertionPoint.appliedNestedStyle
InsertionPoint.dropCapStyle
Line.appliedCharacterStyle
Line.appliedNestedStyle
Line.dropCapStyle
MatchCharacterStylePreference.appliedCharacterStyle
NestedStyle.appliedCharacterStyle
PageReference.pageNumberStyleOverride
Paragraph.appliedCharacterStyle
Paragraph.appliedNestedStyle
Paragraph.dropCapStyle
ParagraphStyle.dropCapStyle
Story.appliedCharacterStyle
Story.appliedNestedStyle
Story.dropCapStyle
Text.appliedCharacterStyle
Text.appliedNestedStyle
Text.dropCapStyle
TextColumn.appliedCharacterStyle
TextColumn.appliedNestedStyle
TextColumn.dropCapStyle
TextDefault.appliedCharacterStyle
TextDefault.dropCapStyle
TextStyleRange.appliedCharacterStyle
TextStyleRange.appliedNestedStyle
TextStyleRange.dropCapStyle
TOCStyleEntry.pageNumberStyle
TOCStyleEntry.separatorStyle
Word.appliedCharacterStyle
Word.appliedNestedStyle
Word.dropCapStyle
XmlStory.appliedCharacterStyle
XmlStory.appliedNestedStyle
XmlStory.dropCapStyle

Used in:

Character.applyCharacterStyle ( using: CharacterStyle)
CharacterStyle.remove ( [replacingWith: CharacterStyle])
CharacterStyles.previousItem ( obj: CharacterStyle)
CharacterStyles.nextItem ( obj: CharacterStyle)
InsertionPoint.applyCharacterStyle ( using: CharacterStyle)
Line.applyCharacterStyle ( using: CharacterStyle)
PageReferences.add ( source: Text[, pageReferenceType: PageReferenceType=CURRENT_PAGE][, pageReferenceLimit: any][, pageNumberStyleOverride: CharacterStyle][, withProperties: Object])
Paragraph.applyCharacterStyle ( using: CharacterStyle)
Text.applyCharacterStyle ( using: CharacterStyle)
TextColumn.applyCharacterStyle ( using: CharacterStyle)
TextStyleRange.applyCharacterStyle ( using: CharacterStyle)
Word.applyCharacterStyle ( using: CharacterStyle)

Returned by:

CharacterStyle CharacterStyle.duplicate ( )
Array of CharacterStyle CharacterStyle.getElements ( )
CharacterStyle CharacterStyle.move ( to: LocationOptions[, reference: any] )
CharacterStyle CharacterStyles.add ( [withProperties: Object] )
CharacterStyle CharacterStyles.anyItem ( )
Array of CharacterStyle CharacterStyles.everyItem ( )
CharacterStyle CharacterStyles.firstItem ( )
CharacterStyle CharacterStyles.item ( index: any )
CharacterStyle CharacterStyles.itemByID ( id: number )
CharacterStyle CharacterStyles.itemByName ( name: string )
Array of CharacterStyle CharacterStyles.itemByRange ( from: any, to: any )
CharacterStyle CharacterStyles.lastItem ( )
CharacterStyle CharacterStyles.middleItem ( )
CharacterStyle CharacterStyles.nextItem ( obj: CharacterStyle )
CharacterStyle CharacterStyles.previousItem ( obj: CharacterStyle )