Marcos is Currently...
- @strandjutternet thxs. Adobe ATL is def heaven for Interaction Designers. As for me, I got my startup call and couldn't let it go by! | 17 hours ago
- "The day Before" is probably going to be my last "weekend photo" for a while: http://flic.kr/p/7Ja9iD | 3 days ago
- @mariroom 今年中にグランドキャニョン絶対行こうよ!ギーク観光ツアーで!参加するメンバー募集頼む!ルート&企画は任せて。 | 5 days ago
- @sho_nishiyama ありがとう!がんばります! | 5 days ago
- @mariroom おっす。マリちゃんと絶対また会えるっしょ。SFいつくる? | 5 days ago
shared items in Google Reader
- "Now, Elvis, look, you get up there, you sing your song, but don’t move too much" | 22 hours ago
- Chart of the Day | 2 days ago
- What Do You Suggest? Exploring the Collective Lives of Google Users | 1 week ago
- Today's Extreme-er Font Dork Moment | 2 weeks ago
- REWARD | 2 weeks ago
recent photos on flickr
recent trips
- 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
- Started a trip to New York. | February 2009
- Returned from a trip to Rosario. | January 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);
}
}
}



















