flash - actionscript text not appearing when embed font is set to true -


I have added a custom class to the custom font in the Flash project library. Now when I try to embed the font and use it with the ActionScript, the text is not visible.

There is no error in throwing. Here's my code.

  var tabfont: font = new tabbed font (); Var format: text format = new text format (); Format.font = tabfont.fontName; Tab.defaultTextFormat = Format; Tab.embedFonts = true; AddChild (tab); Can anyone understand what is wrong with it?   

Have you tried the TextTextFormat method of TextField to apply the text format instead of defaultTextFormat property ? Also, make sure TextFormat is done after setting a property in your TextFormat instance or they will not apply.

  var tabfont: Font = new TabHeaderFont (); Var format: text format = new text format (); Format.font = tabfont.fontName; Tab.embedFonts = true; Tab.setTextFormat (format); AddChild (tab);  

You also need to make sure that you are setting the TextFormat after the .text property of your TextField or the text will not appear.


Comments