Marcos is Currently...
shared items in Google Reader
- Dune House by Jarmund/Vigsnæs AS Architects | October 2011
- Barcode House by David Jameson | October 2011
- On the Corner | October 2011
- Looks Cool, But What Does It Actually Shelter? | October 2011
- Wall Photos | Facebook | October 2011
- La Fontaine Apartment \ Esrawe Studio | October 2011
- The HI-MACS® House in Bavaria, Germany | October 2011
- Ravenscroft Desk by Leonhard Pfeifer | October 2011
- Coldwater Studio by Casey Hughes Architects | September 2011
- A Unique LA Home With Arcade Wall Graphics | September 2011
recent photos on flickr
recent trips
- Returned from a trip to Prescott. | February 2010
- Started a trip to Prescott. | February 2010
- Returned from a trip to Los Angeles. | October 2009
- Started a trip to Los Angeles. | October 2009
- Returned from a trip to New York. | February 2009
news / Embedding fonts in AS3
October 29, 2005
Embedding fonts in AS3
I love this! ... library, be-gone!
package {
import flash.util.describeType;
import flash.display.MovieClip;
import flash.display.TextField;
import flash.text.TextFormat;
import flash.text.AntiAliasType;
public class Test extends MovieClip {
// be sure this is pointing to a ttf font in your hardrive
[Embed(source="C:\WINDOWS\Fonts\somefont.ttf", fontFamily="foo")]
public var bar:String;
public function Test() {
var format:TextFormat = new TextFormat();
format.font = "foo";
format.color = 0xFFFFFF;
format.size = 130;
var label:TextField = new TextField();
label.embedFonts = true;
label.autoSize = TextFieldAutoSize.LEFT;
label.antiAliasType = AntiAliasType.ADVANCED;
label.defaultTextFormat = format;
label.text = "Hello World!";
addChild(label);
}
}
}



















