InDesign listing fonts used on current document

I did a search with little luck. What I would like to do is create a script that repeats through a list of fonts used on an active indd document and then compares each item against a larger list of acceptable fonts. My only drawback is that I don’t know how to pull a list of fonts being used on an InDesign CS4 document. Can anybody help me get started?

Thanks in advance,
Jeff

Hi,

try something like this


set fontList to {"Helvetica	Regular", "Myriad Pro	Bold"}

tell application "Adobe InDesign CS3"
	set usedFonts to name of fonts of active document
end tell

repeat with aFont in usedFonts
	if contents of aFont is not in fontList then
		display dialog "Font " & quote & aFont & quote & " is  not acceptable"
	end if
end repeat

Note: the “spaces” in the font names is a single tab character

You’ve got to be kidding.

“fonts of active document”

.so depressing that it was that simple. Why does it always appear that way after I get a response? :frowning:

This is excellent Stefan. Thank you very much!