AS3 new的文本框使用特定字体

//获取到嵌入的字体
			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);

  

原文地址:https://www.cnblogs.com/dt1991/p/11606209.html