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

How to set Brush Script Std font.

Participant ,
Jan 07, 2017 Jan 07, 2017

Copy link to clipboard

Copied

Hi there,

Need advice here, am trying to set Brush Script Std font to a statictext called 'label', but encounter error.

Please help..

label.graphics.font = ScriptUI.newFont ("Brush Script Std", "", 14);

TOPICS
Scripting

Views

1.8K

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 ,
Jan 07, 2017 Jan 07, 2017

Copy link to clipboard

Copied

What error do you get?

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 ,
Jan 07, 2017 Jan 07, 2017

Copy link to clipboard

Copied

error code 511

Invalid font style

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 ,
Jan 07, 2017 Jan 07, 2017

Copy link to clipboard

Copied

No wonder.

You set the font style to an empty string.

Look up the three arguments of the newFont() method:

CS3 JS: ScriptUI

Did not test this, but how about:

ScriptUI.newFont ("Brush Script Std", "Medium", 14)

Regards,
Uwe

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 ,
Jan 08, 2017 Jan 08, 2017

Copy link to clipboard

Copied

nope.. it doesn't work.

Error code: 511 Invalid font style 'Medium'

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 ,
Jan 08, 2017 Jan 08, 2017

Copy link to clipboard

Copied

Ok.

Then I tested with the predefined string "REGULAR":

ScriptUI.newFont("Brush Script Std", "REGULAR", 14);

That worked.

InDesign CS6 on OSX 10.10.5.

Regards,
Uwe

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 ,
Jan 08, 2017 Jan 08, 2017

Copy link to clipboard

Copied

does not work for me, still getting the same error.

contr.graphics.font = ScriptUI.newFont("Brush Script Std", "REGULAR", 14);     // This will give error

contr.graphics.font = ScriptUI.newFont ("Times New Roman", "BoldItalic", 12);   // This is OK

Really don't understand where the problem lies as i do have Brush Script Std font.  (sigh)

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 ,
Jan 08, 2017 Jan 08, 2017

Copy link to clipboard

Copied

Hi eboda_snaf,

tested this with a script snippet by Peter Kahrel's scriptui-2-13-f-2017.pdf page 40.

https://indd.adobe.com/view/a0207571-ff5b-4bbf-a540-07079bd21d75

Where I simply changed this line:

headers.children.graphics.font = ScriptUI.newFont ("Arial", 'BOLD', 12)

To that one:

headers.children.graphics.font = ScriptUI.newFont ("Brush Script Std", "REGULAR", 14)

Here a screenshot from InDesign CS6 v8.1.0 on Mac OSX 10.7.5:

UsingBrushScriptStdFont-with-ScriptUI.newFont.png

Ok. This is not working as expected with InDesign CC 2017 on Mac OSX 10.7.5.

No error message but the wrong result. As you can see, Brush Script Std. is installed and available with InDesign CC 2017.

UsingBrushScriptStdFont-with-ScriptUI.newFont-CC-2017.png

It is as if the font is not recognized and ScriptUI is doing a default font.

Regards,
Uwe

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 ,
Jan 08, 2017 Jan 08, 2017

Copy link to clipboard

Copied

Here some more information, but maybe outdated a bit for CC 2017:

Indiscripts :: ScriptUI Fonts Facts

I tried Marc's trick by using the PostScript name of the font:

app.fonts.item("Brush Script Std    Medium").postscriptName;

// Result: BrushScriptStd

But had no luck with CC 2017 on Mac OSX 10.10.5.

What is your version of InDesign and OS?

Regards,
Uwe

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 ,
Jan 08, 2017 Jan 08, 2017

Copy link to clipboard

Copied

This notation is working on OSX 10.10.5 with CS6,

but not with CC 2017 , CC 2015.4.1 , CC 2014.2 and CC v9.3.0.

Same result as CC 2017. The right font is not showing. Instead it fails silently and is showing a default font:

headers.children.graphics.font = "Brush Script Std:14";

Using the PostScript font name throws no error in this notation on OSX with CS6 and CC 2017,

but ScriptUI fails silently and defaults to a standard font with both versions of InDesign:

headers.children.graphics.font = "BrushScriptStd:14";

For Windows the results could be quite different.

Depending on used font and version of InDesign.

Regards,
Uwe

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 ,
Jan 08, 2017 Jan 08, 2017

Copy link to clipboard

Copied

Ahem. I should have read pages 127pp of Peter Kahrel's PDF on ScriptUI:

Changes in CC

…

– Typeface and type size can’t be changed.

…

Regards,
Uwe

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 ,
Jan 08, 2017 Jan 08, 2017

Copy link to clipboard

Copied

LATEST

disappointed to know that Typeface and type size can’t be changed in CC.

That will leave us with 'boring' user interface.. don't understand why Adobe wants to remove this 'good' feature. ;(

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