Last active
August 29, 2015 14:18
-
-
Save larsiusprime/558e081f0e651ed1319e to your computer and use it in GitHub Desktop.
OpenFL Text issues reproduction case.
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 openfl.text.TextField; | |
import openfl.display.Bitmap; | |
import openfl.display.BitmapData; | |
import openfl.display.Sprite; | |
import openfl.Assets; | |
import openfl.text.TextFormat; | |
class Main extends Sprite { | |
public function new () { | |
super (); | |
var t:TextField = new TextField(); | |
t.defaultTextFormat = new TextFormat("papyrus.ttf",24); | |
t.text = "Good morning starshine, the earth says hello!"; | |
t.width = 600; | |
t.x = 10; | |
t.y = 10; | |
t.autoSize = openfl.text.TextFieldAutoSize.LEFT; | |
t.multiline = false; | |
t.border = true; | |
trace("width = " + t.width); | |
trace("height = " + t.height); | |
trace("textWidth = " + t.textWidth); | |
trace("textHeight = " + t.textHeight); | |
t.textColor = 0xFFFF0000; | |
addChild(t); | |
} | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<project> | |
<meta title="Displaying a Bitmap" package="org.openfl.samples.displayingabitmap" version="1.0.0" company="OpenFL" /> | |
<app main="Main" path="Export" file="DisplayingABitmap" /> | |
<!--toggle on/off as necessary--> | |
<set name="openfl-legacy" value="true"/> | |
<source path="Source" /> | |
<haxelib name="openfl" /> | |
<assets path="Assets" rename="assets" exclude="*.svg" /> | |
<icon path="Assets/openfl.svg" /> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, assets folder includes TIMES.TTF and PAPYRUS.TTF copied directly from windows font directory.