Ninjadoodle Posted July 2, 2014 Share Posted July 2, 2014 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. Quote Link to comment Share on other sites More sharing options...
lukaszwojciak Posted July 3, 2014 Share Posted July 3, 2014 Is the font-family in the @x2 font asset file (.fnt) also suffixed with @x2? This seems like a naming error - PIXI is trying to load fontName@2x but your font file defines the font as "fontName". Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted July 3, 2014 Author Share Posted July 3, 2014 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 Quote Link to comment Share on other sites More sharing options...
lukaszwojciak Posted July 3, 2014 Share Posted July 3, 2014 Glad I could help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.