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

How to access my custom fonts via AS3?

Explorer ,
Aug 04, 2020 Aug 04, 2020

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? 

106
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
no replies

Have something to add?

Join the conversation