Skip to main content
March 31, 2013
Question

Changing one font into another using extendscript

  • March 31, 2013
  • 1 reply
  • 1417 views

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 ?

This topic has been closed for replies.

1 reply

frameexpert
Community Expert
Community Expert
April 1, 2013

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.

Rick

www.frameexpert.com
April 2, 2013

Thanks Rick,

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,

K.

Arnis Gubins
Inspiring
April 2, 2013

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.