Jump to content

JSON BitmapFont not loading


Recommended Posts

I want to use a Bitmap font on mobile devices, so instead of font.xml I use font.json


My font is called font_main, here is the error:

Phaser.Loader - bitmapfont[font_main]: Cannot read property 'info' of undefined

I load it like this:

        this.load.bitmapFont('font_main', 'res/fonts/font_main.png', 'res/fonts/font_main.json');
If I use font_main.xml instead, it works. Why doesn't the JSON work? I converted it from the XML using font_converter.js node script posted here on the forums. Here is my JSON:  http://codepaste.net/kujuxs
It is not working on desktop.
Link to comment
Share on other sites

  • 5 months later...

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...