8bitdna Posted June 13, 2018 Share Posted June 13, 2018 Hi @enpu I'm using the SystemText class to speed up some dev and came across a bug I think when I'm using the 'hires' feature of the engine. In my game config I have... game.config = { name: 'Slide', system: { width: 640, height: 960, scale: true, center: true, resize: false, hidpi: true, hires: 4 }, scene: { backgroundColor: '#ffffff' }, mobile: { system: { resize: true } } }; ...so 'hires' is set to four. When I test on my phone its fine, hires scale is 1 which I can see in the debug panel, everything looks fine. I test on my iPad and the hires scale ups to 2, which is great, sprites look good still BUT font size of the SystemText jumps a size. So I had a little dig in the engine sourcecode (I'm using 2.7.1dev) in the '/engine/renderer/text.js' file I see this line in the SystemText class (line 483): context.font = this.size * game.scale * game.scale + 'px ' + this.font; ...I changed it to... context.font = this.size * game.scale + 'px ' + this.font; ...and it seems to render better (removed the duplicate scaling). If you could confirm this is ok please and if so roll into the GitHub engine that would be great please. I really need to learn how to perform pull requests lol Quote Link to comment Share on other sites More sharing options...
enpu Posted June 14, 2018 Share Posted June 14, 2018 @8bitdna You are absolutely right, good find! I wonder why there was that double scaling This should be now fixed and pushed to dev branch. Quote Link to comment Share on other sites More sharing options...
8bitdna Posted June 14, 2018 Author Share Posted June 14, 2018 Awesome, when I get some time I'll put some effort into learning some Git basics. I'd like to help with the engine side of things where I can and understand it more also. Quick question in fact regarding the 'Text' class please and asset management when I get a little further forward. I see I can load *.fnt files, whats the preferred software to produce these files (and the matching atlas bitmaps of the font) please? I know in theory any software that handles the format should be ok but for now I'd like to keep with the 'path of least resistance' and go what you know is working great. Thanks as always. Quote Link to comment Share on other sites More sharing options...
enpu Posted June 14, 2018 Share Posted June 14, 2018 @8bitdna Personally i have been using bmGlyph (https://www.bmglyph.com/), though it's Mac only. Glyph Designer would be another good option (https://www.71squared.com/glyphdesigner). Litter is known to work free bitmap font generator that works straight from browser: http://kvazars.com/littera/ 8bitdna 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 14, 2018 Share Posted June 14, 2018 @8bitdna @enpu Same here bmGlyph is awesome and supports @2x / @4x etc. I definitely recommend it if you have a Mac. 8bitdna 1 Quote Link to comment Share on other sites More sharing options...
8bitdna Posted June 14, 2018 Author Share Posted June 14, 2018 Cheers guys, I have a MBP as well as the PC so will take a look Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 14, 2018 Share Posted June 14, 2018 @8bitdna I use my PC primarily, but I boot the Mac up just to use BmGlyph and a couple of programs I cant get on Windows lol. Quote Link to comment Share on other sites More sharing options...
8bitdna Posted June 14, 2018 Author Share Posted June 14, 2018 @Ninjadoodle lol, Glad I'm not the only one! 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.