dandorf Posted September 20, 2014 Share Posted September 20, 2014 I would put my own fonts in game. How would be the way to go? How I can load fonts from a resource folder of my game? Link to comment Share on other sites More sharing options...
lewster32 Posted September 20, 2014 Share Posted September 20, 2014 Something like this tool will let you convert fonts on your system into the format required for BitmapText: http://kvazars.com/littera/ Link to comment Share on other sites More sharing options...
dandorf Posted September 20, 2014 Author Share Posted September 20, 2014 The fonts and have created ... Now I want to know how to introduce them into my game phaser. Thank you! Link to comment Share on other sites More sharing options...
lewster32 Posted September 20, 2014 Share Posted September 20, 2014 This example shows how to use bitmap fonts in your game: http://examples.phaser.io/_site/view_full.html?d=text&f=bitmap+fonts.js&t=bitmap%20fonts Link to comment Share on other sites More sharing options...
dandorf Posted September 20, 2014 Author Share Posted September 20, 2014 Okay, I'm looking at the example. My font is with otf extension I do not understand the parameters given to this function to load the font: game.load.bitmapFont ('desyrel', 'assets / fonts / bitmapFonts / desyrel.png', 'assets / fonts / bitmapFonts / desyrel.xml'); Where do I get the png and xml? Link to comment Share on other sites More sharing options...
lewster32 Posted September 20, 2014 Share Posted September 20, 2014 From the tool I linked to first. Upon exporting the font from that tool, it will give you the xml and png files you need to then bring them into Phaser. Link to comment Share on other sites More sharing options...
dandorf Posted September 20, 2014 Author Share Posted September 20, 2014 Okay, thank you very much. This afternoon will investigate everything and see if I get !!! lewster32 1 Link to comment Share on other sites More sharing options...
dandorf Posted September 20, 2014 Author Share Posted September 20, 2014 As I import my .otf..a font in this tool? Link to comment Share on other sites More sharing options...
Robske Posted September 20, 2014 Share Posted September 20, 2014 If you want to go with WebFonts, that is also possible. It seems like that is actually what you are looking for. There are some timing issues to take into account. Check this link: http://www.html5gamedevs.com/topic/4225-how-do-you-use-a-webfont-in-phaser-exactly/ Link to comment Share on other sites More sharing options...
Recommended Posts