Lingo Dictionary > S > substituteFont |  |

substituteFont

Syntax

    TextMemberRef.substituteFont(originalFont, newFont)
    substituteFont(textMemberRef, originalFont, newFont)

Description

Text cast member command; replaces all instances of `originalFont` with `newFont` in `textMemberRef`.

Example

This script checks to see if the font Bonneville is available in a text cast member, and replaces it with Arial if it is not:

    property spriteNum

    on beginSprite me
    	currMember = sprite(spriteNum).member
    	if currMember.missingFonts contains "Bonneville" then
    		currMember.substituteFont("Bonneville", "Arial")
    	end if
    end

See also

`missingFonts`