v

[ActionScript 3.0] 폰트 임베디드 , Embed font

· 14년 전 · 1229
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);
       }
    }
|
댓글을 작성하시려면 로그인이 필요합니다.

팁게시판

디자인과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
제목 글쓴이 날짜 조회
14년 전 조회 1,452
14년 전 조회 2,482
14년 전 조회 892
14년 전 조회 2,843
14년 전 조회 1,241
14년 전 조회 1,582
14년 전 조회 4,902
14년 전 조회 1,655
14년 전 조회 821
14년 전 조회 634
14년 전 조회 1,771
14년 전 조회 858
14년 전 조회 1,230
14년 전 조회 743
14년 전 조회 733
14년 전 조회 820
14년 전 조회 4,597
14년 전 조회 1,501
14년 전 조회 849
14년 전 조회 2,105
14년 전 조회 1,577
14년 전 조회 1,410
14년 전 조회 2,835
14년 전 조회 1,944
14년 전 조회 930