Skip navigation
LVNF
Currently Being Moderated

External font + external textField

Aug 9, 2012 7:21 AM

Tags: #as3 #swf #actionscript #as3.0 #ac3 #actionscript3 #font_display

I have a font library, which is loaded in runtime and has a font embeded.

After it's loaded I use Font.registerFont

Then I load an swf-file, that has a textField in it. And I do

var format:TextFormat = textField.defaultTextFormat;

format.font = resultFontName;

textField.embedFonts = true;

textField.selectable = false;

textField.antiAliasType = AntiAliasType.ADVANCED;

textField.defaultTextFormat = format;

 

textField.setTextFormat( format);

 

And still I don't see any letters.

 

Please, help.

 
Replies
  • Currently Being Moderated
    Aug 9, 2012 9:49 AM   in reply to LVNF

    Trace the font and see what it outputs, make sure it's what you expect.

     

    trace(format.font);

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2012 10:19 AM   in reply to LVNF

    So you created a new TextField, used the same format and it worked fine? Is this other TextField something you placed on a timeline or was it also created with code?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points