I have an overly complex script that compares the document's fonts missing fonts to the system fonts and makes a best guess. It was written to handle conversion of Multi-ad Creator documents to InDesign. It has worked 100% of the time so far. It needs a LOT of cleaning up and tweaking to make effecient, but that is not the point of my question. Everyday I am sent an InDesign file I have to work with and everyday it will has a missing font. Arial (OTF).
I ran my script thinking it would replace it with Arial (TT). No problem...
Ran it... nothing.
When I use the find dialog in Indesign to search based on the applied font it works, the returned properties in AS contain:
return properties of find text preferences |
font:"Arial (OTF)"
Ok, fine so I try...
set properties of find change text options to {case sensitive:false, whole word:false, include footnotes:false, include hidden layers:false, include locked layers for find:true, include locked stories for find:true, include master pages:true}
set applied font of find text preferences to "Arial (OTF)"
set applied character style of change text preferences to "Page&Header"
tell document 1
set myFoundItems to change text
end tell
Nothing.
This has pretty much worked on every other font I've tried, so what am I doing wrong here?