How do I target a particular font in the Find/Change dialog?
You can record the settings in the find/change dialog box using this script.
Here's my Change fonts CSV script with detailed instructions.
Important note
In my practice, I encountered a problem when replacing fonts with a script in old (converted) documents: the fonts failed to change for some reason. The solution was simple: export files to IDML and import them back to INDD format. That’s why I added support for IDML files in my Batch processor script's new version — 5.
Also, font names can be inconsistent in the font itself which prevents the script from working.
Can you locate them by font size, weight etc?
As far as I remember, targeting the exact font size by script is a tricky business.
For example, if you target, say, look for Arial-Bold 10 pt, it won't find it . I guess this happens because of some rounding error. Probably under the hood Indy thinks it's 9,999999999999999 pt.
The solution isn't on the surface!
My workaround was as follows:
- Find Arial-Bold (no text size is defined at the moment)
- Loop thru all find text items sorting them out by size: e.g. if (txt.pointSize <= 10.1 && txt.pointSize >= 9.9) doSomething()
Can you redefine para styles through this as well?
Yes. it's possible. See examples in the Styles section here.