Lingo Dictionary > D-F > fontStyle

 

fontStyle

Syntax

member(whichCastMember).fontStyle
the fontStyle of member whichCastMember
member(whichCastMember).char[whichChar].fontStyle
the fontStyle of char whichChar
member(whichCastMember).word[whichWord].fontStyle
the fontStyle of word whichWord
member(whichCastMember).line[whichLine].fontStyle
the fontStyle of line whichLine

Description

Cast member property; determines the styles applied to the font used to display the specified field cast member, character, line, word, or other chunk expression and requires that the field cast member contain characters, if only a space.

The value of the property is a string of styles delimited by commas. Lingo uses a font that is a combination of the styles in the string. The available styles are plain, bold, italic, underline, shadow, outline, and extended; on the Macintosh, condensed also is available.

Use the style plain to remove all currently applied styles. The parameter whichCastMember can be either a cast member name or number.

For a movie playing back as an applet, plain, bold, and italic are the only valid styles for the fontStyle member property. The Director player for Java doesn't support underline, shadow, outline, extended, or condensed font styles.

This property can be tested and set.

To see an example of fontStyle used in a completed movie, see the Text movie in the Learning\Lingo Examples folder inside the Director application folder.

Example

This statement sets the variable named oldStyle to the current fontStyle setting for the field cast member Rokujo Speaks:

oldStyle = member("Rokujo Speaks").fontStyle

Example

This statement sets the fontStyle member property for the field cast member Poem to bold italic:

member("Poem").fontStyle = [#bold, #italic]

Example

This statement sets the fontStyle property of the third word of the cast member Son's Names to italic:

member("Son's Names").word[3].fontStyle = [#italic]

Example

This statement sets the fontStyle member property of word 1 through word 4 of text member myNote to bold italic:

member("myNote").word[1..4].fontstyle = [#bold, #italic]

See also

alignment, font, lineHeight (cast member property), fontSize, text