I’m creating a graphical interface / client with OpenFL to plug onto a RakNet backend. The current system is such that every asset used in the client is loaded from the RakNet server. I’ve already got the system working with loading in bitmaps using BitmapData.fromBytes.
However, I also need to load in .ttf fonts. I think the font is properly loaded into a Font object since it gives the correct font name when loaded in with Font.fromBytes. I need to find a way to use that Font object in a TextField though and I can’t figure out how to do that. Most sources seem to say that it’s not possible to load fonts in runtime; even the API docs for the Font class say that you can’t load in external fonts using it.
So, is it possible to use a font loaded at runtime in a TextField and if so, how can I do that? Should I find a way to squeeze it in with the embedded assets accessed via Assets or is there another way to achieve this?
Many thanks in advance!