Getting Fonts Used in a PSD
I'm trying to script some font swapping in PSDs. It mostly works but I discovered a situation where it breaks. If multiples fonts are used on a single text layer, only the first font is listed. I don't know if there is a workaround for this. I've not found one thus far.
Here's the code I'm using, which I borrowed from a list archive somewhere:
tell application "Adobe Photoshop CS5"
tell the current document
set Used_Fonts to {}
set Text_Layers to every art layer whose kind is text layer
repeat with This_Layer in Text_Layers
set This_Font to font of text object of This_Layer
if This_Font is not in Used_Fonts then
set end of Used_Fonts to This_Font
end if
end repeat
end tell
end tell
Used_Fonts
Thanks in advance for any insight into another method to get this info.
Stephan