Created
June 2, 2011 08:12
-
-
Save Draknek/1004100 to your computer and use it in GitHub Desktop.
Font size test
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 net.flashpunk.*; | |
import net.flashpunk.graphics.*; | |
import flash.net.*; | |
import flash.display.*; | |
[SWF(width = "800", height = "640", backgroundColor="#000000")] | |
public class Main extends Engine | |
{ | |
[Embed(source = 'CHANGE THIS.ttf', embedAsCFF="false", fontFamily = 'test')] | |
public static const FONT:Class; | |
public function Main () | |
{ | |
Text.font = "test"; | |
super(800, 640, 60, true); | |
FP.screen.scale = 2; | |
var y:int = 2; | |
for (var i:int = 2; i < 30; i++) { | |
var t:Text = new Text(i + " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 2, y, {size: i}); | |
y+= i; | |
FP.world.addGraphic(t); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment