View Full Version : [AS3] embed regular,bold font into a textArea

07-20-2011, 04:54 PM
I can embed one font fine but it doesn't work when I need a bold font with regular. The textArea is outputting html text like '<b> Hi </b> there.'

I'm trying to embed 2 fonts here but it looks like you can only embed one font into the textArea.

var myFont = new MyriadFont();
var tf:TextFormat = new TextFormat();
tf.color = 0xFFFFFF;
tf.font = myFont.fontName;
tf.size = 12;

var myFont2 = new MyriadFontBold();
var tf2:TextFormat = new TextFormat();
tf2.color = 0xFFFFFF;
tf2.font = myFont2.fontName;
tf2.size = 12;

fbBox.setStyle("embedFonts", true);
fbBox.setStyle("textFormat", tf);
fbBox.setStyle("textFormat", tf2);

searches turn up nothing . thanks.