Just tried to test an old openfl project I didn’t touch for about a year. Everything compiles but all the text fields only display the default font no matter what I do. I checked the 9.1.0 release note. I see there are some internal changes in the TextField class but didn’t spot any changes in the API. I’ve created a minimal project with a single text field:
import openfl.Assets;
import openfl.display.Sprite;
import openfl.text.TextField;
import openfl.text.TextFormat;
class Main extends Sprite {
public function new() {
super();
final textField = new TextField();
textField.setTextFormat(new TextFormat(Assets.getFont('assets/UbuntuMono-Regular.ttf').fontName));
textField.text = 'Hello World';
textField.autoSize = LEFT;
addChild(textField);
}
}
And that’s what I see running any target:
(Ignore the blurriness)
For reference Ubuntu Mono should look like that:
Downgrading to openfl 9.0.2, lime 7.8.0 and haxe 4.1.4 resolves the issue and the font displays properly.
Am I missing some API change?
Versions:
OpenFL 9.1.0
Lime 7.9.0
Haxe 4.2.3
I’m also also running everything on Linux (Arch) if it matters.