TextField with embedded font (Windows target setup ?)

Hi,

I’ve been having some problems using an embedded font in a TextField.

The font (.OTF) shows up just fine in Flash, but not with the Neko or Windows target (I didn’t test the other ones).
I also tried a .WOFF2 version of the font, but then I get an error ‘exception, information=[lime.utils.Assets] ERROR: There is no FONT asset with an ID of “font/OutrunFuture.woff2”
’ for the Flash target.
There’s obviously something I’m not aware of … I have looked for information in many different places, but unfortunately I haven’t been able to solve my problem.

I’m using the latest versions of Haxe, Lime, and OpenFl (just installed + updated).

If somebody could point me in the right direction, that would be great !
Thanks !

EDIT : I don’t understand this anymore … :confused:
Now it is suddenly working on Neko as well … but still not working on Windows. Windows also is not showing my bitmap …

Could you try creating a copy of the “AddingText” sample:

openfl create AddingText

Add your TTF or OTF font in the Assets directory, and in the “Main.hx” file, use the name of your font, like “Outrun future”, or the name that is shown when double-clicking the font and seeing details about it.

Thanks!

Yesterday, I started working on my home laptop, and everything worked as it is supposed to. I’m now thinking it has something to do with Visual Studio on my other laptop. Maybe the Windows target for OpenFL wasn’t setup properly ?
Is there a way to check this ?

I’m wondering why there were no errors or warnings on the first laptop I was working on … ?
I can do some more tests on that laptop tomorrow (I don’t currently have access to it).

Thanks !

Perhaps try a clean build?

The problem seems to be fixed …

I reinstalled lime and openfl (with setup) and also ran the setup for the windows target again. But even then, running the project I was working on this weekend (on the second laptop), resulted in errors. I also noticed that the ‘references’ folder in HaxeDevelop was empty, whereas on my other laptop it holds all the libs.
I had to clean and build the project from the command line multiple times for neko, windows, and flash before everything ‘got somehow fixed’ … :confused:

I have no idea what happened, but I’m happy it’s working now.

1 Like