Text Item Styling

The iWork Text Suite provides the classes and properties for manipulating text in all iWork applications. Using this suite a script can set the font (typeface), size, and color of the object text placed within text items and shapes, as demonstrated in this video of a presentation created by the example script from this page:

Here is the dictionary listing for the iWork Text Suite:

The iWork Text Suite

rich text   pl  rich text : This provides the base rich text class for all iWork applications.

elements

contains characters, paragraphs, words

properties

colorRGB color | text ) : The color of the font. Expressed as an RGB value consisting of a list of three color values from 0 to 65535. ex: Blue = {0, 0, 65535}. In addition, the lowercase names of the following standard colors can be used in place of RGB color value lists: "black", "blue", "brown", "cyan", "green", "magenta", "orange", "purple", "red", "yellow", and "white".

fonttext ) : The name of the font. Can be the PostScript name, such as: “TimesNewRomanPS-ItalicMT”, or display name: “Times New Roman Italic”. TIP: Use the Font Book application get the information about a typeface.

sizeinteger ) : The size of the font (in points).

 

character  [inh. rich text ] : One of some text’s characters.

elements

contained by rich text, paragraphs, words.

 

paragraph  [inh. rich text ] : One of some text’s paragraphs.

elements

contained by rich text.

 

word  [inh. rich text ] : One of some text’s words.

elements

contained by rich text, paragraphs.

The following script demonstrates how to apply styling to a text item’s object text:

TIP: For examples of styling the object text of a shape, select the Shape topic from the Navigation Menu at the top right of this page.

TOP | CONTINUE