Skip to content

CharacterAttributes

characterAttributes

Specifies the properties of a character contained in a text frame. A CharacterStyle object associates these attributes with a specific text range through its characterAttributes property.


characterAttributes.akiLeft

The amount of inter-character spacing to be added to the left side of the character, in thousandths of an em (that amount will not compress or expand during full-justification).

Number (double)


characterAttributes.akiRight

The amount of inter-character spacing to be added to the right side of the character, in thousandths of an em (that amount will not compress or expand during full-justification).

Number (double)


characterAttributes.alignment

The character alignment type.

StyleRunAlignmentType


characterAttributes.alternateGlyphs

The alternate glyphs form.

AlternateGlyphsForm


characterAttributes.autoLeading

If true, the automatic leading should be used.

Boolean


characterAttributes.baselineDirection

The Japanese text baseline direction.

BaselineDirectionType


characterAttributes.baselinePosition

The baseline position of text.

FontBaselineOption


characterAttributes.baselineShift

The amount of shift in points of the text baseline.

Number (double)


characterAttributes.capitalization

The case of text.

FontCapsOption


characterAttributes.connectionForms

If true, the OpenType® connection forms should be used.

Boolean


characterAttributes.contextualLigature

If true, the contextual ligature should be used.

Boolean


characterAttributes.discretionaryLigature

If true, the discretionary ligature should be used.

Boolean


characterAttributes.figureStyle

The number style in a OpenType font.

FigureStyleType


characterAttributes.fillColor

The color of the text fill.

Color


characterAttributes.fractions

If true, the OpenType fractions should be used.

Boolean


characterAttributes.horizontalScale

The character horizontal scaling factor expressed as a percentage (100 = 100%).

Number (double)


characterAttributes.italics

If true, the Japanese OpenType font supports italics.

Boolean


characterAttributes.kerningMethod

The automatic kerning method to use.

AutoKernType


characterAttributes.language

The language of text.

LanguageType


characterAttributes.leading

The amount of space between two lines of text, in points.

Number (double)


characterAttributes.ligature

If true, the ligature should be used.

Boolean


characterAttributes.noBreak

If true, line breaks are not allowed.

Boolean


characterAttributes.openTypePosition

The OpenType baseline position.

FontOpenTypePositionOption


characterAttributes.ordinals

If true, the OpenType ordinals should be used.

Boolean


characterAttributes.ornaments

If true, the OpenType ornaments should be used.

Boolean


characterAttributes.overprintFill

If true, the fill of the text should be overprinted.

Boolean


characterAttributes.overprintStroke

If true, the stroke of the text should be overprinted.

Boolean


characterAttributes.parent

The object’s container.

Object; read-only.


characterAttributes.proportionalMetrics

If true, the Japanese OpenType font supports proportional glyphs.

Boolean


characterAttributes.rotation

The character rotation angle in degrees.

Number (double)


characterAttributes.size

Font size in points.

Number (double)


characterAttributes.strikeThrough

If true, characters use strike-through style.

Boolean


characterAttributes.strokeColor

The color of the text stroke.

Color


characterAttributes.strokeWeight

Line width of stroke.

Number (double)


characterAttributes.stylisticAlternates

If true, the OpenType stylistic alternates should be used.

Boolean


characterAttributes.swash

If true, the OpenType swash should be used.

Boolean


characterAttributes.tateChuYokoHorizontal

The Tate-Chu-Yoko horizontal adjustment in points.

Number (long)


characterAttributes.tateChuYokoVertical

The Tate-Chu-Yoko vertical adjustment in points.

Number (long)


characterAttributes.textFont

The text font.

TextFont


characterAttributes.titling

If true, the OpenType titling alternates should be used.

Boolean


characterAttributes.tracking

The tracking or range kerning amount, in thousandths of an em.

Number (long)


characterAttributes.Tsume

The percentage of space reduction around a Japanese character.

Number (double)


characterAttributes.typename

The class name of the object.

String; read-only.


characterAttributes.underline

If true, characters are underlined.

Boolean


characterAttributes.verticalScale

Character vertical scaling factor expressed as a percentage (= 100%).

Number (double)


CharacterAttributes.wariChuCharactersAfterBreak

Section titled “CharacterAttributes.wariChuCharactersAfterBreak”

characterAttributes.wariChuCharactersAfterBreak

Specifies how the characters in Wari-Chu text (an inset note in Japanese text) are divided into two or more lines.

Number (long)


CharacterAttributes.wariChuCharactersBeforeBreak

Section titled “CharacterAttributes.wariChuCharactersBeforeBreak”

characterAttributes.wariChuCharactersBeforeBreak

Specifies how the characters in Wari-Chu text (an inset note in Japanese text) are divided into two or more lines.

Number (long)


characterAttributes.waiChuEnabled

If true, Wari-Chu is enabled.

Boolean


characterAttributes.wariChuJustification

The Wari-Chu justification.

WariChuJustificationType


characterAttributes.wariChuLineGap

The Wari-Chu line gap.

Number (long)


characterAttributes.wariChuLines

The number of Wari-Chu (multiple text lines fit into a space meant for one) lines.

Number (long)


characterAttributes.wariChuScale

The Wari-Chu scale.

Number (double)


// Creates a new document, adds a simple text item
// then incrementally increases the horizontal and
// vertical scale attributes of each character
var docRef = documents.add();
var textRef = docRef.textFrames.add();
textRef.contents = "I Love Scripting!";
textRef.top = 400;
textRef.left = 100;
// incrementally increase the scale of each character
var charCount = textRef.textRange.characters.length;
var size = 100;
for (var i = 0; i < charCount; i++, size *= 1.2) {
textRef.textRange.characters[i].characterAttributes.horizontalScale = size;
textRef.textRange.characters[i].characterAttributes.verticalScale = size;
}