Hi there, I've been trying to replace one font by another, but no success , and it seems hard to find some good examples on how to do this, though it looks to me like something rather common to do with extend script. Could someone lead me in the right direction ? If for instance I would like to replace a font called 'font1' with weight 'bold' with another one called 'font2' with weight 'bold' into a document, how should I do this ?
Can you be more specific on what you want to do? Do you want to change fonts for a particular paragraph, paragraph format, or character format? You can certainly work with font and weight properties with ExtendScript, but your approach will depend on what you want to do.
In essence it doesn't matter where it's used, if it's used somewhere in my document I want to have it changed. Let's say I am using Helvetica today in parts of my document, could be my default font, or used in paragraph styles, or character style. Wherever I have something using Helvetica I want to have it replaced by let's say Arial.
Basically what I like to achieve with extendscript is similar to what the change font pod is offering, but I also want to have some way to play with the weight properties as some of the fonts I like to replace use weight formats not supported by the newer fonts I need to use.
Hope it's a bit more clear now,
FYI, you can also do font changes globally using the Update All capabilities of the designers with other properties set to AsIs. This assumes that overrides haven't been used to change the fonts anywhere.
Thanks Arnis, I'm aware of it, but I do have overrides and it would force me to go through the designers manually. Therefore I want to do this with scripting (if possible) so it can be one step in a series of actions I already perform with scripting.