Maks Posted July 19, 2015 Share Posted July 19, 2015 Hello everyone, I've got a problem with BitmapText rendering with Phaser 2.4 RC-1. I don't know if it's a problem with my font file or with the framework. A simple piece of code I use :var text = new Phaser.BitmapText(this.game, 0, group.length * GameLobbyGroup.LINE_HEIGHT, 'font', content, 20);And how it renders : http://www.hostingpics.net/viewer.php?id=476958Screenshotfrom20150719233740.png Everything goes on the top left corner of my game... http://www.hostingpics.net/viewer.php?id=476958Screenshotfrom20150719233740.png My font : http://www.hostingpics.net/viewer.php?id=443986font.png The bitmap font file generated with Littera : http://pastebin.com/7bVnz37N Link to comment Share on other sites More sharing options...
Maks Posted July 20, 2015 Author Share Posted July 20, 2015 up Link to comment Share on other sites More sharing options...
InsaneHero Posted July 21, 2015 Share Posted July 21, 2015 Not sure if this is relevant but in the comment header for BitmapText.js: * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of* converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson Although Littera is one of the recommended tools so you would imagine the output format is correct.Have you tried on the current release version to see if you get the same results? Link to comment Share on other sites More sharing options...
Maks Posted July 21, 2015 Author Share Posted July 21, 2015 Yes I've read this comment in the source code, the second line was added after I made some suggestions about BitmapText and JSON formatting lol. I've only tried with RC-1, I don't really know if it is a problem with my font or Phaser, cause I used to work with simple Text instances. Link to comment Share on other sites More sharing options...
Recommended Posts