🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
6 messages
6 total messages Started by Skempy Wed, 11 Feb 2009 16:14
[CS2/CS3 JS] How to set Default Font for multiple documents
#1355
Author: Skempy
Date: Wed, 11 Feb 2009 16:14
11 lines
1095 bytes
Hello,

How do I set the default font for any new text frames I create.

I have several thousand InDesign templates in which the default font is set to a font that is no longer licenced and therefore requires changing.

I already have a script which will open each template and change the first insertion point of any (empty) text frame to a new font but any new text frames created in these templates still want to use the unlicensed font.

Thanks for any assistance.

Simon Kemp
Re: [CS2/CS3 JS] How to set Default Font for multiple documents
#1357
Author: Kasyan_Servetsky
Date: Wed, 11 Feb 2009 16:32
4 lines
805 bytes
for existing documents:
myDoc.textDefaults.appliedFont.name = "Arial\tRegular";
for newly created ones:
app.textDefaults.appliedFont.name = "Arial\tRegular";
Re: [CS2/CS3 JS] How to set Default Font for multiple documents
#1359
Author: Skempy
Date: Wed, 11 Feb 2009 16:59
5 lines
714 bytes
Thanks for the reply Kasyan,

Does this work for CS2 documents?

Simon Kemp
Re: [CS2/CS3 JS] How to set Default Font for multiple documents
#1360
Author: Kasyan_Servetsky
Date: Wed, 11 Feb 2009 17:14
9 lines
829 bytes

      Does this work for CS2 documents?




No,CS2 doesn't support fonts.itemByName method.
I can't check it in CS2, because don't have CS2 version properly working any more.
Re: [CS2/CS3 JS] How to set Default Font for multiple documents
#1361
Author: Skempy
Date: Wed, 11 Feb 2009 17:27
7 lines
711 bytes
Thanks,

This works in CS2:

app.activeDocument.textDefaults.appliedFont = "Helvetica LT Com";

Simon
Re: [CS2/CS3 JS] How to set Default Font for multiple documents
#1362
Author: Kasyan_Servetsky
Date: Wed, 11 Feb 2009 17:29
3 lines
895 bytes
I made a mistake in the previous post: to set default font for application I should have used application's font collection.

app.textDefaults.appliedFont = app.fonts.itemByName ('Arial\tBold');
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads