Converts fonts in text members.
convertFonts("Geneva" , "Arial")
on convertFonts oldFont, newFont
if voidP(oldFont) or voidP(newFont) then
alert "Usage: convertFonts(oldFont, newFont)"
exit
end if
numLibs = the number of castLibs
repeat with n = 1 to numLibs
libName = castLib(n).name
textList=""
myCount=0
x = the number of members of castLib n
repeat with i = 1 to x
myType = member(i,n).type
if myType=#text then
myFont = member(i,n).font
if myFont = oldFont then
member(i,n).font = newFont
myCount = myCount + 1
else
-- text member not using oldFont
-- store in a list to report to the user.
mem = member(i,n).name
mem = mem &&"(font =" &&myFont &")"
textList = textList &mem &RETURN
end if
end if
end repeat
put RETURN &"Converted" &&myCount &&"text members in castLib" &"E &libName "E &"."
put "Some text members that are NOT" &&oldFont &&"font are using" &RETURN &textList
end repeat
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA