User Guide
TextField 1177
embedFonts (TextField.embedFonts property)
public embedFonts : Boolean
Specifies whether to render using embedded font outlines. A Boolean value that, when true,
renders the text field using embedded font outlines. If
false, it renders the text field using
device fonts.
If you set
embedFonts to true for a text field, then you must specify a font for that text via
the
font property of a TextFormat object applied to the text field. If the specified font does
not exist in the library (with the corresponding Linkage Instance name), then the text will not
be displayed.
Availability: ActionScript 1.0; Flash Player 6
Example
In this example, you need to create a dynamic text field called
my_txt, and then use the
following ActionScript to embed fonts and rotate the text field. The reference to
my font
refers to a Font symbol in the library, with linkage set to
my font. The example assumes that
you have a Font symbol in the library called
my font, with linkage properties set as follows:
the identifier set to
my font and Export for ActionScript and Export in First Frame selected.
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "my font";
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160,
120);
my_txt.wordWrap = true;
my_txt.embedFonts = true;
my_txt.text = "Hello world";
my_txt.setTextFormat(my_fmt);
my_txt._rotation = 45;
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.
filters (TextField.filters property)
public filters : Array
An indexed array containing each filter object currently associated with the text field. The
flash.filters package contains several classes that define specific filters that you can use.