Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

[AS][CS5] Find and replace a missing font

$
0
0

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?


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>