Highlighted

Changing font with extendscript

New Here ,
Sep 15, 2020

Copy link to clipboard

Copied

Hello.

 

I'm currently making font selector on my panel with extendscript.

 

I made MOGRT subtitle form with text properties,

 

And I've found method below,


var project = app.project;
var projectItem = project.rootItem;
var slideshowSequence = project.activeSequence;
var videoTracks = slideshowSequence.videoTracks;
var selectClip = videoTracks[1].clips[0];
var component = selectClip.getMGTComponent();

 

now all I have to do is using "setValue()" to change font,

 

but I cannot find any properties to change.

 

I've found Json form below in this community,

 

['{'
,'"fonteditinfo":{'
,'"capPropFontEdit":true,'
,'"capPropFontFauxStyleEdit":true,'
,'"capPropFontSizeEdit":false,'
,'"fontEditValue":"MyriadPro-Bold"'
,'"fontFSAllCapsValue":false,'
,'"fontFSBoldValue":false,'
,'"fontFSItalicValue":false,'
,'"fontFSSmallCapsValue":false,'
,'"fontSizeEditValue":200},'
,'"textEditValue":"New Text"'
,'}']

 

But it doesn't work and I remember one of admin said PPro's extendscript doesn't return JSON.

 

So, is there any way to change font with PPro extendscript?

 

P.S.

I hope that Text properties can be separated to each higher properties when I make an MOGRT essential graphics

TOPICS
How to, User interface or workspaces

Views

36

Likes

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

Changing font with extendscript

New Here ,
Sep 15, 2020

Copy link to clipboard

Copied

Hello.

 

I'm currently making font selector on my panel with extendscript.

 

I made MOGRT subtitle form with text properties,

 

And I've found method below,


var project = app.project;
var projectItem = project.rootItem;
var slideshowSequence = project.activeSequence;
var videoTracks = slideshowSequence.videoTracks;
var selectClip = videoTracks[1].clips[0];
var component = selectClip.getMGTComponent();

 

now all I have to do is using "setValue()" to change font,

 

but I cannot find any properties to change.

 

I've found Json form below in this community,

 

['{'
,'"fonteditinfo":{'
,'"capPropFontEdit":true,'
,'"capPropFontFauxStyleEdit":true,'
,'"capPropFontSizeEdit":false,'
,'"fontEditValue":"MyriadPro-Bold"'
,'"fontFSAllCapsValue":false,'
,'"fontFSBoldValue":false,'
,'"fontFSItalicValue":false,'
,'"fontFSSmallCapsValue":false,'
,'"fontSizeEditValue":200},'
,'"textEditValue":"New Text"'
,'}']

 

But it doesn't work and I remember one of admin said PPro's extendscript doesn't return JSON.

 

So, is there any way to change font with PPro extendscript?

 

P.S.

I hope that Text properties can be separated to each higher properties when I make an MOGRT essential graphics

TOPICS
How to, User interface or workspaces

Views

37

Likes

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
Sep 15, 2020 0

Have something to add?

Join the conversation