原因:根据air版本升级中的说明跟手机测试,air可能取不到手机上的系统字体。
解决方式:嵌入泰文字体,嵌入字体方式:
-
public class testThai extends Sprite
-
{
-
[Embed(source="font/Angsana New.ttf", fontName="Angsana New", embedAsCFF="false",mimeType="application/x-font")]
-
public var ThaiFont:Class;
-
-
public function testThai()
-
{
-
super();
-
-
// 支持 autoOrient
-
stage.align = StageAlign.TOP_LEFT;
-
stage.scaleMode = StageScaleMode.NO_SCALE;
-
-
Font.registerFont(ThaiFont);
-
-
-
-
var tf:TextField = new TextField();
-
tf.textColor=0x00FF00;
-
addChild(tf);
-
tf.x = 100;
-
tf.y = 100;
-
-
var font:Font = new ThaiFont() as Font;
-
var tFormat:TextFormat = new TextFormat(font.fontName,40);
-
tf.defaultTextFormat = tFormat;
-
tf.embedFonts = true;
-
-
tf.text = "??????????????";
-
}
-
-
}
阅读(1923) | 评论(0) | 转发(0) |