0
[CS2/CS3 JS] How to set Default Font for multiple documents

/t5/indesign-discussions/cs2-cs3-js-how-to-set-default-font-for-multiple-documents/td-p/1130885
Feb 11, 2009
Feb 11, 2009
Copy link to clipboard
Copied
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
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
TOPICS
Scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Valorous Hero
,
/t5/indesign-discussions/cs2-cs3-js-how-to-set-default-font-for-multiple-documents/m-p/1130886#M367424
Feb 11, 2009
Feb 11, 2009
Copy link to clipboard
Copied
for existing documents:
app.activeDocument.textDefaults.appliedFont = myDoc.fonts.itemByName ('Arial\tBold');
for newly created ones:
app.textDefaults.appliedFont = myDoc.fonts.itemByName ('Arial\tBold');
app.activeDocument.textDefaults.appliedFont = myDoc.fonts.itemByName ('Arial\tBold');
for newly created ones:
app.textDefaults.appliedFont = myDoc.fonts.itemByName ('Arial\tBold');
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/indesign-discussions/cs2-cs3-js-how-to-set-default-font-for-multiple-documents/m-p/1130887#M367425
Feb 11, 2009
Feb 11, 2009
Copy link to clipboard
Copied
Thanks for the reply Kasyan,
Does this work for CS2 documents?
Simon Kemp
Does this work for CS2 documents?
Simon Kemp
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Valorous Hero
,
/t5/indesign-discussions/cs2-cs3-js-how-to-set-default-font-for-multiple-documents/m-p/1130888#M367426
Feb 11, 2009
Feb 11, 2009
Copy link to clipboard
Copied
>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.
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.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/indesign-discussions/cs2-cs3-js-how-to-set-default-font-for-multiple-documents/m-p/1130889#M367427
Feb 11, 2009
Feb 11, 2009
Copy link to clipboard
Copied
Thanks,
This works in CS2:
app.activeDocument.textDefaults.appliedFont = "Helvetica LT Com";
Simon
This works in CS2:
app.activeDocument.textDefaults.appliedFont = "Helvetica LT Com";
Simon
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Valorous Hero
,
LATEST
/t5/indesign-discussions/cs2-cs3-js-how-to-set-default-font-for-multiple-documents/m-p/1130890#M367428
Feb 11, 2009
Feb 11, 2009
Copy link to clipboard
Copied
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');
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

