有一个解决这个限制的办法:设置scale
var format:TextFormat = new TextFormat();
format.size = 100;
var t:TextField = new TextField();
t.autoSize = TextFieldAutoSize.LEFT;
t.text = "Nice and big.";
t.setTextFormat(format);
t.scaleX = 2;
t.scaleY = 2;
addChild(t);
在Flashplayer10中,TextField还是有这个限制,但是在新的Flash Text Engine中这个限制已经取消了。
设置字号为300px的代码如下:
var ef:ElementFormat = new ElementFormat();
ef.fontSize = 300;
var te:TextElement = new TextElement ("Nice and big.", ef);
var tb:TextBlock = new TextBlock (te);
var tl:TextLine = tb.createTextLin