TextAttrs object

The following table lists the properties of the TextAttrs object, along with their data types and, where appropriate, acceptable values and notes.

Property Data type Notes

alignment

string

Acceptable values are "left", "center", "right", "justify", and "stretch".

baselineShift

integer

The number of pixels above (positive numbers) or below (negative numbers) the baseline by which the characters are shifted.

bold

Boolean

Set to true for bold text, false for normal text.

face

string

The name of the font, such as Arial.

fillColor

string

A color string that specifies the color of the text (see Color string data type).

horizontalScale

float

The relative width of the characters.

1.0 -- normal width

< 1 -- thinner than normal

> 1 -- wider than normal

italic

Boolean

Set to true for italic text, false for normal text.

kerning

float

Also known as pair kerning, kerning specifies the percentage of an em square by which to separate two characters, in addition to the amount the font specifies. Applies to only one pair or characters. To specify kerning for a range of text, use the rangeKerning property.

0 -- normal kerning

< 0 -- move the two characters closer together

> 0 -- move the two characters farther apart

leading

float

The spacing between two lines of text, measured from baseline to baseline. Larger numbers place more space between lines of text. Smaller numbers move the lines closer together. The exact effect of this property number depends on the value of the leadingMode property.

leadingMode

string

The only acceptable value is "percentage", which specifies that the leading property is a percentage of the text's point size. A leading property of 1.0 means 100 percent or single-spaced, 2.0 means 200 percent or double-spaced, and so on.

rangeKerning

float

The same as the kerning property, but applies to a range of text, not only two characters.

size

string

String of the form "#pt", where # is a numeric value.

underline

Boolean

Set to true for underlined text, false for normal text.


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fireworks/8/fwextending/fw_02_59.htm