feri Posted March 25, 2016 Share Posted March 25, 2016 Hi All I have characters in png file format (they are created in illustrator) and I wanna make bitmap font from them. I can create sprite sheet using texture packer but I need to create xml file for bitmap font. I am just wondering if there is a tool available to get png file and generates xml file that is supported by Phaser. I can do it manually but it is alot of work, I thought there might be some tools out there to automate some of the work for me. Thanks Link to comment Share on other sites More sharing options...
shohan4556 Posted March 25, 2016 Share Posted March 25, 2016 http://kvazars.com/littera/ this is I used to generate bitmap font. Link to comment Share on other sites More sharing options...
feri Posted March 25, 2016 Author Share Posted March 25, 2016 Thanks for your reply. I think i wasnt clear enough. I have my png font file and i just need xml file for my png. Littera is a great tool to create png font file and its xml all together, it doesn't generate xml based on a font image. thanks Link to comment Share on other sites More sharing options...
Tom Atom Posted March 25, 2016 Share Posted March 25, 2016 Hi, I had similar problem - I needed to create bitmap font xml from sprites I had. What I did is I created excel file that helped me to create xml defs. In attachment you can download it. It is without support nor feature requests, but I will describe here, how it works: First create standard sprite atlas with your characters. Open .json and locate data for your chars. Open excel and copy chars data to cell N1 and bellow (you will probably be missing property "anchor" if you are using texture packer, so you will have to adjust either excel or your output to include empty line ... or you can use my atlas tool - it is reffered in this article: http://sbcgamesdev.blogspot.cz/2016/03/phaser-tutorial-merging-fonts-into.html) Next, put chars you need into column A - it must be in order of your json output! (not sure if Texturepacker guarantees order, but my tool does) - in case of need add lines. Formulas in column B extracts data and build xml entry. Finally, copy text in column B and save it as .xml. In cell L1 you can adjust how many pixels will be added between characters (characters spacing). This excel tool does not support kerning. Play with B2, B3 texts to adjust line height or default font height. FONT_YELLOW.xlsx feri 1 Link to comment Share on other sites More sharing options...
feri Posted March 25, 2016 Author Share Posted March 25, 2016 Thanks alot Tom Link to comment Share on other sites More sharing options...
Recommended Posts