Bruce Powell <[EMAIL PROTECTED]> wrote:

> "...Director will use a default font to display the following: Geneva"
...
> Is there some way for me to locate all font typefaces used by
> castmember?


Hi Bruce,

Below you'll find the handler that I use in cases like this, where only
#text members are concerned.  It uses the .missingFonts property for #text
members and works in D7 and up.

Use the handler as follows:

  put FindMissingFonts()
  -- ["Geneva!": [(member 2 of castLib 1)]]

Tip: to create a missing font to test the handler with, create a text
member, name it, then type a nonsense word in the member's font choice
field.

I also have a set of handlers that work for both #field and #text members,
but it is slightly over the lingo-l message-size limit.  If you want a copy,
email me directly and I'll send it on.

Cheers,

James

----------------------------------------------------------------------------

on FindMissingFonts() ------------------------------------------------
  -- ONLY WORKS FOR TEXT MEMBERS
  -- OUTPUT: a property list with the structure:
  --         [<missing font name>: [affected text members], ...]
  --------------------------------------------------------------------
  
  tMissingFontList = [:]
  tMissingFontList.sort()
  
  tCastLibNum = the number of castLibs
  
  repeat while tCastLibNum
    tMemberNum = the number of members of castLib(tCastLibNum)
    
    repeat while tMemberNum
      tMember = member(tMemberNum, tCastLibNum)
      if tMember.type = #text then
        tMissingFonts = tMember.missingFonts
        
        i = tMissingFonts.count
        repeat while i
          tFont    = tMissingFonts[i]
          tMembers = tMissingFontList[tFont]
          if ilk(tMembers) <> #list then
            tMembers = []
            tMembers.sort()
            tMissingFontList[tFont] = tMembers
          end if
          
          tMembers.add(tMember)
          
          i = i - 1
        end repeat
      end if
      
      tMemberNum = tMemberNum - 1
    end repeat
    
    tCastLibNum = tCastLibNum - 1
  end repeat
  
  return tMissingFontList
end FindMissingFonts

[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!]

Reply via email to