Skip to main content
This topic has been closed for replies.
Correct answer Sunil Yadav

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

4 replies

Community Expert
November 3, 2020

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:

 

 

The same code with e.g. InDesign 2021:

 

 

Regards,
Uwe Laubender

( ACP )

Known Participant
December 20, 2023

Same isue with Illustrator

Why ?????

Community Expert
December 20, 2023

Hi @Jeffosaure ,

it's a bug with ScriptUI. So this happens in all products that utilize ScriptUI.

Among them InDesign, Illustrator, PhotoShop…

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Legend
November 2, 2020

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

Balaji Murugesan
Known Participant
November 2, 2020

Hi Dirk,

I cant understand this...

 

Thanks

brian_p_dts
Community Expert
Community Expert
November 2, 2020

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. 

Sunil Yadav
Sunil YadavCorrect answer
Legend
November 1, 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

brian_p_dts
Community Expert
Community Expert
October 30, 2020

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.