Thursday, August 14, 2008

Fonts Bug

TextField::defaultTextFormat does not work with TextField::htmlText

var tf:TextrField = new TextField();
var format:TextFormat = new TextFormat("Arial");
addChild(tf);

Does not work:
tf.embedFonts = true;
tf.defaultTextFormat = format;
tf.htmlText = "Test";

Works:
tf.embedFonts = true;
tf.defaultTextFormat = format;
tf.text = "Test";

For TextField::htmlText use :
tf.setTextFormat(format);

No comments: