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

How to set Brush Script Std font.

Participant ,
Jan 07, 2017 Jan 07, 2017

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
2.7K
Translate
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

What error do you get?

Translate
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

error code 511

Invalid font style

Translate
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

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

Translate
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

nope.. it doesn't work.

Error code: 511 Invalid font style 'Medium'

Translate
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

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

Translate
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

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)

Translate
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

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

Translate
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

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

Translate
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

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

Translate
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

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

Translate
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
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. ;(

Translate
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