richpixel Posted April 7, 2014 Share Posted April 7, 2014 I have a very similar question to this topic but didn't understand the answer and figured no one would read it since the post is marked as 'answered' http://www.html5gamedevs.com/topic/4682-bitmapfont-atlas/ What I'd like to do is1- Load the font data xml file in my preloader2- Adjust the font 'char' data so the x,y offsets map into a texture atlas that i've already loaded that contains the actual font bitmap data3- Set the texture on the font so it points to the texture atlas In Phaser.LoaderParser.bitmapFont(), I can see it doing #3... but does Phaser have a util to load just an xml file? Also, is this worth it? In Starling it's good to use as few texture atlases as possible because there's a performance penalty to switching textures, but I have no idea if that applies here to Canvas/WebGL. Thanks mariogarranz 1 Link to comment Share on other sites More sharing options...
rich Posted April 8, 2014 Share Posted April 8, 2014 You can use load.text and then parse the string as XML directly. It's worth doing if you have loads of textures (enough to fill up GPU ram for example), but if you're talking just a handful then no, it won't make any difference. Link to comment Share on other sites More sharing options...
Recommended Posts