Jump to content

Bitmap font won't show with 'Retina' enabled (SOLVED)


Ninjadoodle
 Share

Recommended Posts

Hi I tested this thoroughly and when I enable 'retina' I get this message when trying to show a bitmap font ...

 

TypeError: 'undefined' is not an object (evaluating 'PIXI.BitmapText.fonts[this.fontName].size')

 

All the correct assets are there (@2x png and fnt).

 

With 'retina' disabled, the font shows fine.

Link to comment
Share on other sites

Awesome, with your help I've managed to find the problem.

 

I've looked inside the @2x.fnt file and found that that 'face' property was empty (I called my font 'MyFont' but the name was only present in the standard .fnt file).

 

Just to help anyone that might come across this issue, the face property is the name Panda.js uses to refer to the font file, so make sure that when you export your fonts, fill out all the fields for each resolution.

 

Thank you for your help. I would not have found the problem otherwise :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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