CharacterStyle

A character style.

Methods:

extractLabel, insertLabel, remove

Objects:

Boolean, Capitalization, CharacterStyle, Font, Language, Leading, NothingEnum, OTFFigureStyle, Object, Position, String, StrokeStyle, Swatch,

Property Listing

Property

Type

Access

Description

appliedFont

Font

String

NothingEnum.NOTHING

read/write

The font applied to the CharacterStyle, specified as either a font object or the name of font family. Can return: Font, String or NothingEnum enumerator.

appliedLanguage

Language

NothingEnumCanalsoaccept:String

read/write

The language of the text. Can return: Language or NothingEnum enumerator. Can also accept: String.

basedOn

CharacterStyle

String

NothingEnum.NOTHING

read/write

The style that this style is based on. Can return: CharacterStyle, String or NothingEnum enumerator.

baselineShift

Real

NothingEnum.NOTHING

read/write

The vertical distance by which to offset the CharacterStyle from the baseline. Can return: Real or NothingEnum enumerator.

capitalization

Capitalization

Capitalization.ALL_CAPS

Capitalization.CAP_TO_SMALL_CAP

Capitalization.NORMAL

Capitalization.SMALL_CAPS

NothingEnum.NOTHING

read/write

The capitalization scheme. Can return: Capitalization enumerator or NothingEnum enumerator.

fillColor

Swatch

NothingEnumCanalsoaccept:String

read/write

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

Real (range 0 - 100)

NothingEnum.NOTHING

read/write

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

String

NothingEnum.NOTHING

read/write

The name of the font style. Can return: String or NothingEnum enumerator.

horizontalScale

Real

NothingEnum.NOTHING

read/write

The horizontal scaling applied to the CharacterStyle. Can return: Real or NothingEnum enumerator.

hyphenWeight

Short

NothingEnum.NOTHING

read/write

Hyphen weight. Can return: Short or NothingEnum enumerator.

id

Long

NothingEnum.NOTHING

readonly

The unique ID of the CharacterStyle. Can return: Long or NothingEnum enumerator.

imported

Boolean

NothingEnum.NOTHING

readonly

If true, the style was imported from another document. Can return: Boolean or NothingEnum enumerator.

index

Long

NothingEnum.NOTHING

readonly

The index of the CharacterStyle within its containing object. Can return: Long or NothingEnum enumerator.

kerningMethod

String

NothingEnum.NOTHING

read/write

The type of pair kerning. Can return: String or NothingEnum enumerator.

label

String

NothingEnum.NOTHING

read/write

A property that can be set to any string. Can return: String or NothingEnum enumerator.

leading

Leading

Leading.AUTO

Real

NothingEnum.NOTHING

read/write

The leading amount. Can return: Real, Leading enumerator or NothingEnum enumerator.

ligatures

Boolean

NothingEnum.NOTHING

read/write

If true, replaces specific character combinations (e.g., fl, fi) with ligature characters. Can return: Boolean or NothingEnum enumerator.

name

String

NothingEnum.NOTHING

read/write

The name of the CharacterStyle. Can return: String or NothingEnum enumerator.

noBreak

Boolean

NothingEnum.NOTHING

read/write

If true, keeps the text on the same line. . Can return: Boolean or NothingEnum enumerator.

otfContextualAlternate

Boolean

NothingEnum.NOTHING

read/write

If true, uses contextual alternate forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.

otfDiscretionaryLigature

Boolean

NothingEnum.NOTHING

read/write

If true, uses discretionary ligatures in OpenType fonts. Can return: Boolean or NothingEnum enumerator.

otfFigureStyle

OTFFigureStyle

OTFFigureStyle.DEFAULT_VALUE

OTFFigureStyle.PROPORTIONAL_LINING

OTFFigureStyle.PROPORTIONAL_OLDSTYLE

OTFFigureStyle.TABULAR_LINING

OTFFigureStyle.TABULAR_OLDSTYLE

NothingEnum.NOTHING

read/write

The figure style in OpenType fonts. Can return: OTFFigureStyle enumerator or NothingEnum enumerator.

otfFraction

Boolean

NothingEnum.NOTHING

read/write

If true, uses fractions in OpenType fonts. Can return: Boolean or NothingEnum enumerator.

otfOrdinal

Boolean

NothingEnum.NOTHING

read/write

If true, uses ordinals in OpenType fonts. Can return: Boolean or NothingEnum enumerator.

otfSwash

Boolean

NothingEnum.NOTHING

read/write

If true, uses swash forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.

otfTitling

Boolean

NothingEnum.NOTHING

read/write

If true, uses titling forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.

overprintFill

Boolean

NothingEnum.NOTHING

read/write

If true, the fill color of the characters will overprint. Can return: Boolean or NothingEnum enumerator.

overprintStroke

Boolean

NothingEnum.NOTHING

read/write

If true, the stroke of the characters will overprint. Can return: Boolean or NothingEnum enumerator.

parent

Application

Document

readonly

The parent of the CharacterStyle (a Document or Application).

pointSize

Real

NothingEnum.NOTHING

read/write

The size of the CharacterStyle in points. Can return: Real or NothingEnum enumerator.

position

Position

Position.NORMAL

Position.OT_DENOMINATOR

Position.OT_NUMERATOR

Position.OT_SUBSCRIPT

Position.OT_SUPERSCRIPT

Position.SUBSCRIPT

Position.SUPERSCRIPT

NothingEnum.NOTHING

read/write

The text position relative to the baseline. Can return: Position enumerator or NothingEnum enumerator.

properties

Object

read/write

A property that allows setting of several properties at the same time.

skew

Real

NothingEnum.NOTHING

read/write

The skew angle of the CharacterStyle. Can return: Real or NothingEnum enumerator.

strikeThroughColor

String

Swatch

NothingEnum.NOTHING

read/write

The swatch (color, gradient, tint, or mixed ink) applied to the strikethrough stroke. Can return: Swatch, String or NothingEnum enumerator.

strikeThroughGapColor

String

Swatch

NothingEnum.NOTHING

read/write

The swatch (color, gradient, tint, or mixed ink) applied to the gap of the strikethrough stroke. Can return: Swatch, String or NothingEnum enumerator.

strikeThroughGapOverprint

Boolean

NothingEnum.NOTHING

read/write

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

Real (range 0 - 100)

NothingEnum.NOTHING

read/write

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

Unit

NothingEnum.NOTHING

read/write

The amount by which to offset the strikethrough stroke from the text baseline. Can return: Unit or NothingEnum enumerator.

strikeThroughOverprint

Boolean

NothingEnum.NOTHING

read/write

If true, the strikethrough stroke will overprint. Can return: Boolean or NothingEnum enumerator.

strikeThroughTint

Real (range 0 - 100)

NothingEnum.NOTHING

read/write

The tint (as a percentage) of the strikethrough stroke. (Range: 0 to 100). Can return: Real or NothingEnum enumerator.

strikeThroughType

StrokeStyle

NothingEnum.NOTHING

read/write

The stroke type of the strike through. Can return: StrokeStyle or NothingEnum enumerator.

strikeThroughWeight

Real

NothingEnum.NOTHING

read/write

The stroke weight of the strikethrough. Can return: Real or NothingEnum enumerator.

strikeThru

Boolean

NothingEnum.NOTHING

read/write

If true, draws a strikethrough line through the text. Can return: Boolean or NothingEnum enumerator.

strokeColor

Swatch

NothingEnumCanalsoaccept:String

read/write

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

Real (range 0 - 100)

NothingEnum.NOTHING

read/write

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

Real

NothingEnum.NOTHING

read/write

The stroke weight (in points) to apply to the stroke of the text. Can return: Real or NothingEnum enumerator.

tracking

Real

NothingEnum.NOTHING

read/write

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

Boolean

NothingEnum.NOTHING

read/write

If true, underlines the text. Can return: Boolean or NothingEnum enumerator.

underlineColor

String

Swatch

NothingEnum.NOTHING

read/write

The swatch (color, gradient, tint, or mixed ink) applied to the underline stroke. . Can return: Swatch, String or NothingEnum enumerator.

underlineGapColor

String

Swatch

NothingEnum.NOTHING

read/write

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

Boolean

NothingEnum.NOTHING

read/write

If true, the gap color of the underline stroke will overprint. Can return: Boolean or NothingEnum enumerator.

underlineGapTint

Real (range 0 - 100)

NothingEnum.NOTHING

read/write

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

Unit

NothingEnum.NOTHING

read/write

The amount by which to offset the underline from the text baseline. Can return: Unit or NothingEnum enumerator.

underlineOverprint

Boolean

NothingEnum.NOTHING

read/write

If true, the underline stroke color will overprint. Can return: Boolean or NothingEnum enumerator.

underlineTint

Real (range 0 - 100)

NothingEnum.NOTHING

read/write

The underline stroke tint (as a percentage). (Range: 0 to 100). Can return: Real or NothingEnum enumerator.

underlineType

StrokeStyle

NothingEnum.NOTHING

read/write

The stroke type of the underline. Can return: StrokeStyle or NothingEnum enumerator.

underlineWeight

Real

NothingEnum.NOTHING

read/write

The underline stroke weight. Can return: Real or NothingEnum enumerator.

verticalScale

Real

NothingEnum.NOTHING

read/write

The vertical scaling applied to the CharacterStyle. Can return: Real or NothingEnum enumerator.

Method Listing

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

undefined 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.

undefined remove ()

Deletes the CharacterStyle.

Object of

IndexOptions.crossReferenceTopicStyle

IndexOptions.crossReferenceStyle

IndexOptions.pageNumberStyle

PageReference.pageNumberStyleOverride

TOCStyleEntry.pageNumberStyle

TOCStyleEntry.separatorStyle

TextDefault.appliedCharacterStyle

Text.appliedCharacterStyle

Character.appliedCharacterStyle

Word.appliedCharacterStyle

Line.appliedCharacterStyle

TextColumn.appliedCharacterStyle

Paragraph.appliedCharacterStyle

TextStyleRange.appliedCharacterStyle

InsertionPoint.appliedCharacterStyle

Story.appliedCharacterStyle

NestedStyle.appliedCharacterStyle

TextDefault.dropCapStyle

Text.dropCapStyle

Character.dropCapStyle

Word.dropCapStyle

Line.dropCapStyle

TextColumn.dropCapStyle

Paragraph.dropCapStyle

TextStyleRange.dropCapStyle

InsertionPoint.dropCapStyle

Story.dropCapStyle

ParagraphStyle.dropCapStyle

CharacterStyle.basedOn

Return

CharacterStyles.add()