User Guide

1182 ActionScript classes
Returns
TextFormat - The TextFormat object that represents the formatting properties for the
specified text.
Example
The following ActionScript code traces all of the formatting information for a text field that is
created at runtime.
this.createTextField("dyn_txt", this.getNextHighestDepth(), 0, 0, 100,
200);
dyn_txt.text = "Frank";
dyn_txt.setTextFormat(new TextFormat());
var my_fmt:TextFormat = dyn_txt.getTextFormat();
for (var prop in my_fmt) {
trace(prop+": "+my_fmt[prop]);
}
The MovieClip.getNextHighestDepth() method used in this example requires Flash Player
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth() method.
See also
getNewTextFormat (TextField.getNewTextFormat method), setNewTextFormat
(TextField.setNewTextFormat method)
, setTextFormat (TextField.setTextFormat
method)
gridFitType (TextField.gridFitType property)
public gridFitType : String
The type of grid fitting used for this TextField instance. This property applies only if the
antiAliasType property of the text field is set to "advanced".
For the
gridFitType property, you can use the following string values:
String value Description
"none" Specifies no grid fitting. Horizontal and vertical lines in the glyphs
are not forced to the pixel grid. This setting is usually good for
animation or for large font sizes.