Created
February 15, 2012 06:25
-
-
Save wwwins/1833759 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Sprite; | |
import flash.events.Event; | |
import flash.text.Font; | |
/** | |
* 注意 document main class 不要用 main 會跟 loader main class 打架 | |
*/ | |
public class MainFont extends Sprite | |
{ | |
[Embed(source = "ctb_wt024.ttf", fontName = "FontName", unicodeRange = "U+31,U+32,U+33,U+34,U+35,U+36,U+37,U+38,U+39,U+30,U+52c7,U+6562,U+8ffd,U+9010,U+81ea,U+5df1,U+7684,U+5922,U+548c,U+8272,U+5f69", mimeType = "application/x-font-truetype", embedAsCFF="false")] | |
public var FontClass:Class; | |
public function MainFont():void | |
{ | |
Font.registerFont(FontClass); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment