Skip to main content
Known Participant
August 4, 2020
Question

How to access my custom fonts via AS3?

  • August 4, 2020
  • 0 replies
  • 130 views

I have a custom fonts in my library:

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? 

    This topic has been closed for replies.