Embedding fonts centrally
package {
import flash.display.*;
import flash.text.*;
public class Main extends Sprite {
public function Main ( ) {
var t:TextField = new TextField( );
t.embedFonts = true;
t.htmlText = "<FONT FACE='Verdana'>Hello world</FONT>";
addChild(t);
}
}
}
class FontEmbedder {
[Embed(source="c:/windows/fonts/verdana.ttf",fontFamily="Verdana")]
private var verdana:Class;
}
Related examples in the same category