AS3 new text box to use a specific font

// Get the embedded fonts 
			var fontClass: Class = the getDefinitionByName ( "ArialFontDt") Class AS; 
			// Sign Font 
			Font.registerFont (fontClass); 
			var TF: the TextFormat the TextFormat = new new (); 
			tf.font = "Arial"; 
			= pySize tf.size; 
			tf.letterSpacing = 10; 
			var TXT: the TextField the TextField = new new (); 
			// embedded font 
			txt.embedFonts = to true; 
			txt.text = pyContent; 
			txt.setTextFormat (TF); 

			py_gra the Sprite = new new (); 
			py_gra.addChild (TXT); 
			this.addChild (py_gra);

  

Guess you like

Origin www.cnblogs.com/dt1991/p/11606209.html