//获取到嵌入的字体
			var fontClass:Class = getDefinitionByName("ArialFontDt") as Class;
			//注册字体
			Font.registerFont(fontClass);
			var tf:TextFormat = new TextFormat();
			tf.font = "Arial";
			tf.size = pySize;
			tf.letterSpacing = 10;
			var txt:TextField = new TextField();
			//使用嵌入字体
			txt.embedFonts=true;
			txt.text=pyContent;
			txt.setTextFormat(tf);

			py_gra = new Sprite();
			py_gra.addChild(txt);
			this.addChild(py_gra);

  

posted on 2019-09-29 10:11  我是cdt  阅读(206)  评论(0编辑  收藏  举报