
Код AS3:
package
{
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFormat;
public class Main extends Sprite
{
[Embed(source="C:\\Windows\\Fonts\\CENTURY.TTF", fontName="MyFont")]
private var fontName:String;
public function Main():void
{
var tf:TextFormat = new TextFormat();
tf.font = "MyFont";
var t:TextField = new TextField();
t.text = "Hello";
t.embedFonts = true;
t.setTextFormat(tf);
addChild(t);
t.rotation += 45;
}
}
}