• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Change UI Font size in indesign using javascript

Participant ,
Oct 30, 2020 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 , Sync and storage , Type

Views

1.6K

Translate

Translate

Report

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

correct answers 1 Correct answer

Advocate , Nov 01, 2020 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

Votes

Translate

Translate
Community Expert ,
Oct 30, 2020 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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 01, 2020 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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 02, 2020 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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Hi Dirk,

I cant understand this...

 

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2020 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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2020 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 )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 20, 2023 Dec 20, 2023

Copy link to clipboard

Copied

Same isue with Illustrator

Why ?????

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 20, 2023 Dec 20, 2023

Copy link to clipboard

Copied

LATEST

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 )

Votes

Translate

Translate

Report

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