obliviot Posted April 6, 2018 Share Posted April 6, 2018 I am using the font.fnt asset which is used on some of the tutorials. My text just isnt showing up on screen game.addAsset('font.fnt'); game.createScene('Main', { backgroundColor: '#000000', word_score: 0, total_score: 0, picked_word: '', init: function() { this.bg = new game.TilingSprite('play-bg.png'); this.bg.addTo(this.stage); this.board = new game.Board(game.width / 2, game.height / 2 - 50); this.board.container.addTo(this.stage); var text = new game.Text('Hello Panda'); text.addTo(this.stage); } }); I have tried removing the tiling sprite and bard class from the init but still no joy. Anything i should be looking for? Quote Link to comment Share on other sites More sharing options...
enpu Posted April 6, 2018 Share Posted April 6, 2018 @obliviot Can't see anything wrong with the code. Do you have also the font.png file in your media folder? Quote Link to comment Share on other sites More sharing options...
obliviot Posted April 6, 2018 Author Share Posted April 6, 2018 ugh no ... like I said it's late .. I feel foolish. Thank you Quote Link to comment Share on other sites More sharing options...
makowey Posted May 29, 2018 Share Posted May 29, 2018 (edited) Hi, I have a similar issue: game.addAsset('font.fnt'); game.createScene('Main', { backgroundColor: '#00CCFF', init: function() { var info = new game.Text('Informations'); info.addTo(this.stage); var text = new game.SystemText('System text...'); text.addTo(this.stage); } }); I tried with different types of *.fnt (xml, txt formats), same result. Text not rendering. I attached media folder & main screen capture. Thanks for help, Claudiu. Edited May 29, 2018 by Claudiu Macovei I replaced the font with ones used in the demos[endlessrunner] and it works... Quote Link to comment Share on other sites More sharing options...
enpu Posted May 30, 2018 Share Posted May 30, 2018 @Claudiu Macovei What software did you use to generate your font files? Quote Link to comment Share on other sites More sharing options...
makowey Posted May 31, 2018 Share Posted May 31, 2018 @enpu I tried with this http://kvazars.com/littera/ & https://github.com/libgdx/libgdx/wiki/Hiero. Quote Link to comment Share on other sites More sharing options...
enpu Posted May 31, 2018 Share Posted May 31, 2018 @Claudiu Macovei Littera XML format was not detected correctly, but it should be now fixed. You can try it by updating your project's engine to latest dev version. Quote Link to comment Share on other sites More sharing options...
makowey Posted June 4, 2018 Share Posted June 4, 2018 @enpu I did it -> version 2.7.0. I'm getting: Uncaught TypeError: Cannot read property 'replace' of undefined at Class.parseFont (loader.js:342) at Class.<anonymous> (core.js:932) at XMLHttpRequest.<anonymous> (core.js:932) font[name][cont[0]] = cont[1].replace(/['"]+/g, ''); Thanks Quote Link to comment Share on other sites More sharing options...
enpu Posted June 4, 2018 Share Posted June 4, 2018 @Claudiu Macovei 2.7.0 is latest master version. Please try to update to latest dev version 2.7.1dev. Open Settings and look for "Update to dev version" at the bottom. Check it and try again. Quote Link to comment Share on other sites More sharing options...
makowey Posted June 4, 2018 Share Posted June 4, 2018 (edited) @enpu Yes, all good on 2.7.1dev branch, thanks. ? I have another issue, editor related. I ran the game in detached window mode, with a fullscreen option in the game. The screen had been maximized by calling of game.system.fullscreen(), but now I cannot resize it back as is in attached mode. Same for the editor window. Maybe I missing something. Reinstalled on same PC, same issue. Installed on new PC - okay. Some caches save this fullscreen preferences. Edited June 5, 2018 by Claudiu Macovei no min max button for window (cannot disable the fullscreen mode) Quote Link to comment Share on other sites More sharing options...
enpu Posted June 5, 2018 Share Posted June 5, 2018 @Claudiu Macovei Hmm i'm not sure if i understand the issue correctly. So you have detached game window, then you enter fullscreen mode with game.system.fullscreen(); but then can't exit the fullscreen mode back to normal? Quote Link to comment Share on other sites More sharing options...
makowey Posted June 5, 2018 Share Posted June 5, 2018 (edited) @enpu Yes. It looks like the maximize/minimize buttons form disappeared. The gray bar from the last capture is from panda editor. Should contains the 3 buttons (min/max/exit). That disappeared when I called the game.system.fullscreen(). If the live form is detached will be always on fullscreen mode, if the live panel is reattached back this is shown in his place, but the whole editor is in a full screen mode. My supposition is that the editor should contains some option to exit from fullscreen, like Window -> Minimize/Zoom. My OS taskbar is hidden only when Panda editor is selected/on view. Edited June 5, 2018 by Claudiu Macovei valid windows - this is on another machine Quote Link to comment Share on other sites More sharing options...
enpu Posted June 5, 2018 Share Posted June 5, 2018 @Claudiu Macovei This seems to be only Windows issue, since on Mac i can see button where i can exit fullscreen mode. I have now added "Exit Fullscreen" to the window menu that works also by pressing ESC. This will be on next Panda 2 release. Quote Link to comment Share on other sites More sharing options...
makowey Posted June 6, 2018 Share Posted June 6, 2018 @enpu Awesome. Thank you. 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.