I tried upgrading a OpenFL legacy project but come upon the issue that text in upscaled text fields is rendered blurry (tested on Neko and iOS).
Here’s an illustration of the problem:
The text «Foo» is rendered at scale 1, the first «Bar» at scale 2 – notice how blurry the second text is rendered. For reference, the second «Bar» is rendered at scale 1 with twice the font size and is how I would expect the first «Bar» to appear.
Here’s the same with «-Dlegacy»:
I’ve tried this with OpenFL 3.5.3 and 3.6.1 with the same result. Is this the expect result? Coming from Flash, I would expect a text field to be rendered at its display resolution and not at the resolution of its local coordinate space.
Here’s the code that I used:
var format = new TextFormat();
format.size = 50;
var tf = new TextField();
tf.defaultTextFormat = format;
tf.text = "Foo";
tf.x = tf.y = 10;
addChild(tf);
tf = new TextField();
tf.defaultTextFormat = format;
tf.text = "Bar";
tf.scaleX = tf.scaleY = 2;
tf.x = 120;
tf.y = 10;
addChild(tf);
var format2 = new TextFormat();
format2.size = 100;
tf = new TextField();
tf.defaultTextFormat = format2;
tf.text = "Bar";
tf.x = 320;
tf.y = 10;
tf.width = 320;
addChild(tf);
Note that the program crashes on the latest OpenFL version 3.6.1 unless I manually set a font.