Highlighted

How to access my custom fonts via AS3?

Community Beginner ,
Aug 04, 2020

Copy link to clipboard

Copied

I have a custom fonts in my library:

LWR_Recording

I'd like to be able to reference this, so I can apply it's font to a newly created text field, like this:

 

var txtFormat:TextFormat = new TextFormat();
var myFont:Font = new $ColdDefaultFont();
txtFormat.font = myFont.fontName;

MyTextField = new TextField();
MyTextField.defaultTextFormat = txtFormat;

 

However I can't seem to instance my custom font from the libary, so that I can check which font it's using.

 

Does anyone know how? 

Views

15

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

How to access my custom fonts via AS3?

Community Beginner ,
Aug 04, 2020

Copy link to clipboard

Copied

I have a custom fonts in my library:

LWR_Recording

I'd like to be able to reference this, so I can apply it's font to a newly created text field, like this:

 

var txtFormat:TextFormat = new TextFormat();
var myFont:Font = new $ColdDefaultFont();
txtFormat.font = myFont.fontName;

MyTextField = new TextField();
MyTextField.defaultTextFormat = txtFormat;

 

However I can't seem to instance my custom font from the libary, so that I can check which font it's using.

 

Does anyone know how? 

Views

16

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
Aug 04, 2020 0

Have something to add?

Join the conversation