Change UI Font size in indesign using javascript

Community Beginner ,
Oct 30, 2020

Copy link to clipboard

Copied

Hi All,

 

How ti change UI font size in indesign using javascript. 

 

Os : MAc

 

Thanks

Balaji Murugesan

TOPICS
Activation billing and install, Bug, EPUB, Feature request, How to, Import and export, InCopy workflow, Performance, Scripting, SDK, Server developers, Sync and storage, Type

Views

212

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

1 Correct Answer

Adobe Community Professional , Nov 01, 2020
Sunil Yadav Adobe Community Professional , Nov 01, 2020
Try this: var dialog = new Window("dialog"); var statictext1 = dialog.add("statictext", undefined, undefined, {name: "statictext1"}); statictext1.text = "This 30 pt"; statictext1.graphics.font = ScriptUI.newFont("Helvetica", "Bold", 30); dialog.show();   P.S. : ScriptUI.newFont() for ScriptUI will only show effect in InDesign CC 2017 or lower. In New version is not working.   Best Sunil

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Community Professional ,
Oct 30, 2020

Copy link to clipboard

Copied

For the script UI, Page 81 of Peter Kahrel's Scripting UI for Dummies discusses this in detail: 

 

https://creativepro.com/files/kahrel/indesign/scriptui.html

 

There is no option for the regular InDesign interface. 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Nov 01, 2020

Copy link to clipboard

Copied

Try this:

var dialog = new Window("dialog"); 
var statictext1 = dialog.add("statictext", undefined, undefined, {name: "statictext1"}); 
statictext1.text = "This 30 pt"; 
statictext1.graphics.font = ScriptUI.newFont("Helvetica", "Bold", 30);
dialog.show();

 

P.S. : ScriptUI.newFont() for ScriptUI will only show effect in InDesign CC 2017 or lower. In New version is not working.

 

Best

Sunil

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Guide ,
Nov 02, 2020

Copy link to clipboard

Copied

Please stop cross-posting to unrelated forum "topics" (former sub-forums) - any but "Scripting" in this case.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Nov 02, 2020

Copy link to clipboard

Copied

Hi Dirk,

I cant understand this...

 

Thanks

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Nov 02, 2020

Copy link to clipboard

Copied

You tagged this post with the following categories: 

Activation billing and install, Bug, EPUB, Feature request, How to, Import and export, InCopy workflow, Performance, Scripting, SDK, Server developers, Sync and storage, Type

He's saying don't overtag your posts with irrelevant topics. Tags are how users search for useful information on these forums, and this post is not relevant to "Activation, billing and install", for example. 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Nov 03, 2020

Copy link to clipboard

Copied

Hi together,

properties like point size, font etc. do not work anymore with ScriptUI since InDesign version 9.

A long-standing bug. Never fixed.

 

Sunil's code with InDesign CS6 version 8.1:

 

ScriptUI-Test-InDesign-CS6.PNG

 

The same code with e.g. InDesign 2021:

 

ScriptUI-Test-InDesign-2021.PNG

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more