Chinaunix首页 | 论坛 | 博客
  • 博客访问: 278854
  • 博文数量: 64
  • 博客积分: 3099
  • 博客等级: 中校
  • 技术积分: 615
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-29 19:38
文章分类

全部博文(64)

文章存档

2015年(1)

2014年(7)

2013年(6)

2012年(3)

2010年(11)

2009年(3)

2008年(19)

2007年(14)

我的朋友

分类: Android平台

2013-08-12 19:12:48

原因:根据air版本升级中的说明跟手机测试,air可能取不到手机上的系统字体。

解决方式:嵌入泰文字体,嵌入字体方式:

点击(此处)折叠或打开

  1. public class testThai extends Sprite
  2.     {
  3.         [Embed(source="font/Angsana New.ttf", fontName="Angsana New", embedAsCFF="false",mimeType="application/x-font")]
  4.         public var ThaiFont:Class;
  5.  
  6.         public function testThai()
  7.         {
  8.             super();
  9.  
  10.             // 支持 autoOrient
  11.             stage.align = StageAlign.TOP_LEFT;
  12.             stage.scaleMode = StageScaleMode.NO_SCALE;
  13.  
  14.             Font.registerFont(ThaiFont);
  15.  
  16.  
  17.  
  18.             var tf:TextField = new TextField();
  19.             tf.textColor=0x00FF00;
  20.             addChild(tf);
  21.             tf.x = 100;
  22.             tf.y = 100;
  23.  
  24.             var font:Font = new ThaiFont() as Font;
  25.             var tFormat:TextFormat = new TextFormat(font.fontName,40);
  26.             tf.defaultTextFormat = tFormat;
  27.             tf.embedFonts = true;
  28.  
  29.             tf.text = "??????????????";
  30.         }
  31.  
  32.     }

阅读(1884) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~