Adobe InDesign CS (3.0) Object Model JS: CharacterStyle

InDesign CS

Class

CharacterStyle

 A character style.

QuickLinks

extractLabel, insertLabel, remove

Hierarchy

Application | Document
CharacterStyle

Properties

PropertyTypeAccessDescription
appliedFontFontNothingEnum
String
r/wThe font applied to the text, specified as either a font object or the name of font family. Can return: Font, String or NothingEnum enumerator.
appliedLanguageLanguage
NothingEnum
String
r/wThe language of the text. Can return: Language or NothingEnum enumerator. Can also accept: String.
basedOnCharacterStyle
NothingEnum
String
r/wThe style that this style is based on. Can return: CharacterStyle, String or NothingEnum enumerator.
baselineShiftNothingEnum
Real
r/wThe vertical distance by which to offset the text from the baseline. Can return: Real or NothingEnum enumerator.
capitalizationCapitalization
NothingEnum
r/wThe capitalization scheme. Can return: Capitalization enumerator or NothingEnum enumerator.
characterDirectionCharacterDirectionOptions
NothingEnum
r/wThe direction of the character. Can return: CharacterDirectionOptions enumerator or NothingEnum enumerator.
diacriticPositionDiacriticPositionOptions
NothingEnum
r/wPosition of diacriticical characters. Can return: DiacriticPositionOptions enumerator or NothingEnum enumerator.
digitsTypeDigitsTypeOptions
NothingEnum
r/wThe digits type. Can return: DigitsTypeOptions enumerator or NothingEnum enumerator.
fillColorNothingEnum
String
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the fill of the text. . Can return: Swatch or NothingEnum enumerator. Can also accept: String.
fillTintNothingEnum
Real
r/wThe tint (as a percentage) of the fill color of the text. (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.
fontStyleNothingEnum
String
r/wThe name of the font style. Can return: String or NothingEnum enumerator.
horizontalScaleNothingEnum
Real
r/wThe horizontal scaling applied to the text as a percentage of its current size. (Range: 1 to 1000). Can return: Real or NothingEnum enumerator.
hyphenWeightNothingEnum
Short
r/wHyphen weight. Can return: Short or NothingEnum enumerator.
idLong
NothingEnum
readonlyThe unique ID of the CharacterStyle. Can return: Long or NothingEnum enumerator.
importedBoolean
NothingEnum
readonlyIf true, the style was imported from another document. Can return: Boolean or NothingEnum enumerator.
indexLong
NothingEnum
readonlyThe index of the CharacterStyle within its containing object. Can return: Long or NothingEnum enumerator.
kashidasKashidasOptions
NothingEnum
r/wUse of Kashidas for justification. Can return: KashidasOptions enumerator or NothingEnum enumerator.
kerningMethodNothingEnum
String
r/wThe type of pair kerning. Can return: String or NothingEnum enumerator.
keyboardDirectionCharacterDirectionOptions
NothingEnum
r/wThe keyboard direction of the character. Can return: CharacterDirectionOptions enumerator or NothingEnum enumerator.
labelNothingEnum
String
r/wA property that can be set to any string. Can return: String or NothingEnum enumerator.
leadingLeading
NothingEnum
Real
r/wThe leading amount. Can return: Real, Leading enumerator or NothingEnum enumerator.
ligaturesBoolean
NothingEnum
r/wIf true, replaces specific character combinations (e.g., fl, fi) with ligature characters. Can return: Boolean or NothingEnum enumerator.
nameNothingEnum
String
r/wThe name of the CharacterStyle. Can return: String or NothingEnum enumerator.
noBreakBoolean
NothingEnum
r/wIf true, keeps the text on the same line. . Can return: Boolean or NothingEnum enumerator.
otfContextualAlternateBoolean
NothingEnum
r/wIf true, uses contextual alternate forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfDiscretionaryLigatureBoolean
NothingEnum
r/wIf true, uses discretionary ligatures in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfFigureStyleNothingEnum
OTFFigureStyle
r/wThe figure style in OpenType fonts. Can return: OTFFigureStyle enumerator or NothingEnum enumerator.
otfFractionBoolean
NothingEnum
r/wIf true, uses fractions in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfJustificationAlternateBoolean
NothingEnum
r/wIf true, use alternate justification forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfOrdinalBoolean
NothingEnum
r/wIf true, uses ordinals in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfOverlapSwashBoolean
NothingEnum
r/wIf true, use overlapping swash forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfStretchedAlternateBoolean
NothingEnum
r/wIf true, use stretched alternate forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfStylisticAlternateBoolean
NothingEnum
r/wIf true, use stylistic alternate forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfSwashBoolean
NothingEnum
r/wIf true, uses swash forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
otfTitlingBoolean
NothingEnum
r/wIf true, uses titling forms in OpenType fonts. Can return: Boolean or NothingEnum enumerator.
overprintFillBoolean
NothingEnum
r/wIf true, the fill color of the characters will overprint. Can return: Boolean or NothingEnum enumerator.
overprintStrokeBoolean
NothingEnum
r/wIf true, the stroke of the characters will overprint. Can return: Boolean or NothingEnum enumerator.
parentApplication
Document
readonlyThe parent of the CharacterStyle (a Document or Application).
pointSizeNothingEnum
Real
r/wThe size of the text in points. Can return: Real or NothingEnum enumerator.
positionNothingEnum
Position
r/wThe text position relative to the baseline. Can return: Position enumerator or NothingEnum enumerator.
propertiesObject r/wA property that allows setting of several properties at the same time.
skewNothingEnum
Real
r/wThe skew angle of the text. (Range: -85 to 85). Can return: Real or NothingEnum enumerator.
strikeThroughColorNothingEnum
String
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the strikethrough stroke. Can return: Swatch, String or NothingEnum enumerator.
strikeThroughGapColorNothingEnum
String
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the gap of the strikethrough stroke. Can return: Swatch, String or NothingEnum enumerator.
strikeThroughGapOverprintBoolean
NothingEnum
r/wIf 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.
strikeThroughGapTintNothingEnum
Real
r/wThe 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.
strikeThroughOffsetNothingEnum
Unit
r/wThe amount by which to offset the strikethrough stroke from the text baseline. Can return: Unit or NothingEnum enumerator.
strikeThroughOverprintBoolean
NothingEnum
r/wIf true, the strikethrough stroke will overprint. Can return: Boolean or NothingEnum enumerator.
strikeThroughTintNothingEnum
Real
r/wThe tint (as a percentage) of the strikethrough stroke. (Range: 0 to 100). Can return: Real or NothingEnum enumerator.
strikeThroughTypeNothingEnum
StrokeStyle
r/wThe stroke type of the strike through. Can return: StrokeStyle or NothingEnum enumerator.
strikeThroughWeightNothingEnum
Real
r/wThe stroke weight of the strikethrough. Can return: Real or NothingEnum enumerator.
strikeThruBoolean
NothingEnum
r/wIf true, draws a strikethrough line through the text. Can return: Boolean or NothingEnum enumerator.
strokeColorNothingEnum
String
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the stroke of the text. Can return: Swatch or NothingEnum enumerator. Can also accept: String.
strokeTintNothingEnum
Real
r/wThe tint (as a percentage) of the stroke color of the text. (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.
strokeWeightNothingEnum
Real
r/wThe stroke weight (in points) to apply to the stroke of the text. Can return: Real or NothingEnum enumerator.
trackingNothingEnum
Real
r/wThe amount by which to loosen or tighten a block of text, specified in thousands of an em. Can return: Real or NothingEnum enumerator.
underlineBoolean
NothingEnum
r/wIf true, underlines the text. Can return: Boolean or NothingEnum enumerator.
underlineColorNothingEnum
String
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the underline stroke. . Can return: Swatch, String or NothingEnum enumerator.
underlineGapColorNothingEnum
String
Swatch
r/wThe 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.
underlineGapOverprintBoolean
NothingEnum
r/wIf true, the gap color of the underline stroke will overprint. Can return: Boolean or NothingEnum enumerator.
underlineGapTintNothingEnum
Real
r/wThe 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.
underlineOffsetNothingEnum
Unit
r/wThe amount by which to offset the underline from the text baseline. Can return: Unit or NothingEnum enumerator.
underlineOverprintBoolean
NothingEnum
r/wIf true, the underline stroke color will overprint. Can return: Boolean or NothingEnum enumerator.
underlineTintNothingEnum
Real
r/wThe underline stroke tint (as a percentage). (Range: 0 to 100). Can return: Real or NothingEnum enumerator.
underlineTypeNothingEnum
StrokeStyle
r/wThe stroke type of the underline. Can return: StrokeStyle or NothingEnum enumerator.
underlineWeightNothingEnum
Real
r/wThe underline stroke weight. Can return: Real or NothingEnum enumerator.
verticalScaleNothingEnum
Real
r/wThe vertical scaling applied to the text as a percentage of its current size. (Range: 1 to 1000). Can return: Real or NothingEnum enumerator.
xOffsetDiacriticNothingEnum
Real
r/wThe x (horizontal) offset for diacritic adjustment. Can return: Real or NothingEnum enumerator.
yOffsetDiacriticNothingEnum
Real
r/wThe y (vertical) offset for diacritic adjustment. Can return: Real or NothingEnum enumerator.

Methods

Instances

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

ParameterTypeDescription
keystringThe key.

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

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void remove ()
Deletes the CharacterStyle.

Element of

ChangePreference.appliedCharacterStyle

Character.appliedCharacterStyle

Character.dropCapStyle

CharacterStyle.basedOn

FindPreference.appliedCharacterStyle

IndexOptions.crossReferenceStyle

IndexOptions.crossReferenceTopicStyle

IndexOptions.pageNumberStyle

InsertionPoint.appliedCharacterStyle

InsertionPoint.dropCapStyle

Line.appliedCharacterStyle

Line.dropCapStyle

NestedStyle.appliedCharacterStyle

PageReference.pageNumberStyleOverride

Paragraph.appliedCharacterStyle

Paragraph.dropCapStyle

ParagraphStyle.dropCapStyle

Story.appliedCharacterStyle

Story.dropCapStyle

TOCStyleEntry.pageNumberStyle

TOCStyleEntry.separatorStyle

Text.appliedCharacterStyle

Text.dropCapStyle

TextColumn.appliedCharacterStyle

TextColumn.dropCapStyle

TextDefault.appliedCharacterStyle

TextDefault.dropCapStyle

TextStyleRange.appliedCharacterStyle

TextStyleRange.dropCapStyle

Word.appliedCharacterStyle

Word.dropCapStyle

XMLExportMap.mappedStyle

XMLImportMap.mappedStyle

Used in:

void Character.applyStyle (using: any[, clearingOverrides: bool=true])

void InsertionPoint.applyStyle (using: any[, clearingOverrides: bool=true])

void Line.applyStyle (using: any[, clearingOverrides: bool=true])

PageReference PageReferences.add (parentStory: Story, storyOffset: any[, pageReferenceType: PageReferenceType=PageReferenceType.CURRENT_PAGE][, pageReferenceLimit: any][, pageNumberStyleOverride: CharacterStyle][, withProperties: Object])

void Paragraph.applyStyle (using: any[, clearingOverrides: bool=true])

void Text.applyStyle (using: any[, clearingOverrides: bool=true])

void TextColumn.applyStyle (using: any[, clearingOverrides: bool=true])

void TextStyleRange.applyStyle (using: any[, clearingOverrides: bool=true])

void Word.applyStyle (using: any[, clearingOverrides: bool=true])

XMLExportMap XMLExportMaps.add (mappedStyle: any, markupTag: any[, withProperties: Object])

XMLImportMap XMLImportMaps.add (markupTag: any, mappedStyle: any[, withProperties: Object])

Return

CharacterStyle CharacterStyles.add ([withProperties: Object])

Jongware, 27-Jun-2010 v3.0.3dContents :: Index