Marcos is Currently...
- San Fran to Yellowstone overland on a front cover "assignment" for Flipboard ;) http://post.ly/uRDH | 3 days ago
- @jackiefree hiii! | 5 days ago
- @kkfactory 久しぶり!ありがとう! | 6 days ago
- @MCHammer btw, this is the App I was telling you about today: it's called iRhyme, and done by @charlietuna http://j.mp/9aoc9u | 1 week ago
shared items in Google Reader
- Cat-trashing lady outed by internet in less than 24 hours | 2 weeks ago
- Fuck You by Cee-Lo | 2 weeks ago
- The timeless design of National Geographic | 2 weeks ago
- Pancake flipping robot | last month
- Ugur Derinogullu | last month
- 5 Porcelain Table Pieces By Aldo Bakker | last month
- Victorian Star Wars portraits | June 2010
- Place, Space and the Mobile Interface | June 2010
- Apple, AT&T sued over iPad data plan change | June 2010
- Alexis Marcou | June 2010
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);
}
}
}



















