font (TextFormat.font プロパティ)

public font : String

テキストのフォントの名前を指定するストリング。デフォルト値 null はプロパティを未設定にします。

メモ : Flash Lite では、このプロパティは埋め込みフォントでのみ機能します。このプロパティは、アラビア語、ヘブライ語、タイ語ではサポートされません。

使用できるバージョン : ActionScript 1.0、Flash Lite 2.0

次の例では、テキストフィールドを作成し、フォントを Courier に設定します。

this.createTextField("mytext",1,100,100,100,100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;

var myformat: TextFormat = new TextFormat();
myformat.font = "Courier";

mytext.text = "this is my first text field object text";
mytext.setTextFormat(myformat);