加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex 字体加载方式2(只支持系统自带字体)

发布时间:2020-12-15 03:53:28 所属栏目:百科 来源:网络整理
导读:?flex加载字体方式2:该加载方式使用css加载字体,只支持系统自带的字体,不支持嵌入式字体。 ?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600"mx:Style.my

?flex加载字体方式2:该加载方式使用css加载字体,只支持系统自带的字体,不支持嵌入式字体。

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
	<mx:Style>
		.myStyle1{
			font-family:宋体;
			font-size:20px;
		}
	</mx:Style>
	<mx:Script>
		<![CDATA[
			import mx.controls.Image;
			private function init():void{
				var bmp:BitmapData =new BitmapData(aa.width,aa.height);
				bmp.draw(aa);
				var bt:Bitmap = new Bitmap(bmp);
				var img:Image = new Image();
				img.source=bt;
				img.x=200;
				img.y=200;
				img.rotation=120;
				addChild(img);
			}
		]]>
	</mx:Script>
	<mx:Label id="aa" x="143" styleName="myStyle1" y="139" text="你好" creationComplete="init()"/>
</mx:Application>
?


?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读