Created
December 17, 2012 08:55
-
-
Save wouterds/4316802 to your computer and use it in GitHub Desktop.
Font embedding
This file contains hidden or 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
// Embedding | |
[Embed(source="/../media/fonts/DINPro-Medium.otf", embedAsCFF="false", fontFamily="DinProMedium")] | |
public static const DinProMedium:Class; | |
[Embed(source="/../media/fonts/OpenSans-Regular.ttf", embedAsCFF="false", fontFamily="OpenSansRegular")] | |
public static const OpenSansRegular:Class; | |
[Embed(source="/../media/fonts/OpenSans-Semibold.ttf", embedAsCFF="false", fontFamily="OpenSansSemibold")] | |
// Usage | |
Config.OpenSansRegular; | |
var textfield:TextField = new TextField(Starling.current.stage.stageWidth - Config.ContentOffset * 2, Starling.current.stage.stageHeight, textElementVO.text, "OpenSansRegular", Config.NormalTextSize, Config.NormalTextColor); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment