If you're using D8.5, your keywords are out of date - castType, #richtext & textFont - although it obviously works for you to an extent.on FindFonts repeat with i = 1 to the number of castmembers of castLib 4 if the castType of cast i of castLib 4 = EMPTY then nothing else if the castType of cast i of castLib 4 = #richtext then put the memberNum of cast i of castLib 4 && the textFont of cast i of castLib 4 end if end if end repeat endThis works but only gives me one font per cast member. If I pick a cast member and, for test purposes, place three or four different fonts in it, only the first one is identified with this code. QUESTION: Is there some way for me to locate all font typefaces used by castmember? It could even be a space with a not wanted font on it.
#text members have a #missingFonts property - check the dictionary.
That being said, when I've had a similar problem it hasn't been *that* useful to me. Safer/more successful is to walk the cast looking for #text members, then walking the individual characters of the text member checking for fonts used.
Try the following as a start:
--
on findMissingFonts aFontName
nLibs = the number of castLibs
repeat with l = 1 to nLibs
nMems = the number of members of castLib l
repeat with m = 1 to nMems
if member(m,l).type = #text then
nChars = member(m,l).char.count
if nChars then
repeat with c = 1 to nChars
tFont = member(m,l).char[c].font
if tFont = aFontName then
put member(m,l), c
exit repeat
end if
end repeat
end if
end if
end repeat
end repeat
end
--
HTH,
-Sean.
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
