Why change font size to int?

A recent update changed the font size parameter to int. To me, this makes no sense, as I use the size to scale fonts and therefore values would need to be floats. Floats have also been the standard behavior in legacy and AS.

I respectfully ask to reconsider this change.

“size:Object (default = null) — An integer that indicates the size in pixels.”

I don’t know much about the flash api, but the doc seems to indicate it was a int.

And since it’s in pixels float value don’t make much sense.

You can still scale it, just round it after.

EDIT: apparently AS accepts float but rounds them: https://github.com/openfl/openfl/issues/673

I’m open to opinions on this

In the ActionScript documentation, it calls it an Object because it can be null. In Haxe, we have the handy Null type that can wrap other types, so Null<Int> (for example) is an option.

For a long time, I thought that these were float values, but realized these are integer values. We try to impose the right types over the Flash API, though I understand that in ActionScript, float values convert to integers without warnings, as they do in Haxe.

If we need to use Float in TextFormat for convenience, I’m open to it. Otherwise I think Int is the real type we were looking for