You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HaxePunk version: current git version, but it likely affects 2.6.0 as well
Target(s): Tested on Linux
Haxe version: 3.2.1
OpenFL/Lime or NME version: Openfl 4.5.2 and Lime 3.5.2
I've run into a few issues when accessing and using properties on Text objects such as size or font. If I write for example
var t = new Text("Hello World");
t.font = "somefont.ttf";
t.size = 32;
The text will not actually have the correct size and font. The only way to set these is by using a TextFormat, or an anonymous TextFormat like this:
var t = new Text("Hello World", {font: "somefont.ttf"});
Obviously, this is less than ideal, but the larger issue is that modifying text properties after creation, which I do in my current projects, is not possible.
Additionally, the textWidth and textHeight properties do not work currently and always return 0, but that may or may not be related.
The text was updated successfully, but these errors were encountered:
Thanks. I was able to reproduce this on both native and Flash. It looks like we're updating the TextFormat correctly, but setTextFormat needs to be called on the TextField for it to actually reflect the changes.
bendmorris
added a commit
to bendmorris/HaxePunk
that referenced
this issue
Dec 29, 2016
I've done some further investigating regarding the text properties, and while they are being set correctly on flash, they aren't being set correctly on native and html5. Some properties like color work, but size and align and probably others don't. However, the alpha property doesn't update correctly on flash, but does on native.
I've run into a few issues when accessing and using properties on Text objects such as size or font. If I write for example
The text will not actually have the correct size and font. The only way to set these is by using a TextFormat, or an anonymous TextFormat like this:
Obviously, this is less than ideal, but the larger issue is that modifying text properties after creation, which I do in my current projects, is not possible.
Additionally, the textWidth and textHeight properties do not work currently and always return 0, but that may or may not be related.
The text was updated successfully, but these errors were encountered: