'embead font'에 해당되는 글 1건

  1. 2010/04/26 visualp Embedding fonts in AS3

Embedding fonts in AS3

Action Script RSS Icon ATOM Icon 2010/04/26 10:15 visualp
[원문]: http://marumushi.com/tags/as3

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);
       }
    }
}
2010/04/26 10:15 2010/04/26 10:15
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/251

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/251