I am creating a textfield using this code:
window_title = p.createTextField(“border”+diepixWindow.NextBorderDepth, p.getNextHighestDepth(), wx1+TITLE_OFFSETX, wy1+TITLE_OFFSETY, ww, 64);
var fformat:TextFormat = new TextFormat();
fformat.font = “TF2 Build”;
fformat.size = 36;
window_title.setTextFormat(fformat);
window_title.setNewTextFormat(fformat);
But the problem is, if the client doesn’t have the “TF2 Build” font, the font will be Times New Roman.
I would like to know to attach the font to the .swf file.
This will fix it:
You also need to actually embed the font in the swf file, though. If you’re using the Flash application, set the font in the properties window and then just check the embed box. If you’re using mxmlc, you can embed the font with @Embed.
See here: http://www.adobe.com/devnet/flash/quickstart/embedding_fonts/