What's the best-practice for loading fonts? I'm getting an error eventually when loading a font within a scene. Maybe it's the way I'm using scenes. The application is the one mentioned here
http://www.giderosmobile.com/forum/discussion/528/sudden-need-for-an-user-interface-ui#Item_9 . Each button on a GUI causes the switch to another scene. So there can be a lot of rapid scene changes as the user navigates the application. Fonts are loaded on scene change. Eventually, I get a failure to load a font like:
fonts:/Aclonica-42.txt: No such file or directory. |
But this exact font (path and all) is used by this scene successfully many times before it fails.
Any ideas? Should I be loading all the fonts once at the start of the application and reference them from a table?
This happens for both TTFonts and BMFonts.
Comments
Mike
http://www.sharksoupstudios.com
I remember there was something like "images/someimage.png" working ok, but "./images/someimage.png" not working on Android and that kind of stuff.
Mike
http://www.sharksoupstudios.com
This is an interesting bug. How do you specify path? The bug occurs on player or on exported application? (iOS? Android?)
Additional information, in case it's important: The project has the virtual folder "fonts". The actual .ttf file is in a subdirectory with the same name 'fonts/' within the project's root directory.