embedFonts and TextLineMetrics.width problem

i have this problem when i use the “embedFonts = true”
i get the “TextLineMetrics.width =0”
while i’m sure i have text in the TextField
any one knew why and how can i fix this ??
this is the code :
var metrics:TextLineMetrics;
var tempTextField:TextField = new TextField();
var tempTextFormat:TextFormat = new TextFormat();
tempTextFormat.font=“Arial”;
tempTextField.width = 500;
tempTextField.height = 500;
tempTextField.embedFonts = true;
tempTextField.appendText(“Hello World”);
tempTextField.defaultTextFormat = tempTextFormat;
//
trace(tempTextField.text);
metrics = tempTextField.getLineMetrics(0);
trace(metrics.width);