claycr4ne Posted March 24, 2015 Share Posted March 24, 2015 Hello all,To start with, I'm still using Phaser versions 2.1.x in my game projects as for some reason Phaser 2.2.x doesn't display anything at all when started on Nokia Lumia (Mobile IE). In any case, I came across this problem today to which I need some help. In my game I'm using special characters such as å, ä and ö in Text objects. In addition to this, I'm using Helsinki webfont. These special characters are displayed nicely without any errors using Phaser 2.1.2. Today, however, I wanted to add fadeTo-method to my background music and for this I needed to upgrade my Phaser to version 2.1.3. Doing this upgrade unfortunately made all my special characters appear like this:å -> aä -> aö -> oIs there anything I can do to get these characters displayed like they did with Phaser 2.1.2? I really need both special characters and fadeTo -methods in my game, so I'd appreciate your help.Thanks!- Marko Link to comment Share on other sites More sharing options...
jouniii Posted March 27, 2015 Share Posted March 27, 2015 Problem is in PIXI.Text. It calculates text height with rendering character "M" (capital M and it's not configurable), and it probably is not enough to cover those umlaut dots. You probably could patch that part of code or do some workaround as I did. It's a bit silly workaround: Add line feed to text (\n) to make it larger. Still not good, so offset with lineSpacing 10 or something fitting. You need to readjust the text position as it goes a bit off, but atleast text displays correctly. Link to comment Share on other sites More sharing options...
claycr4ne Posted April 17, 2015 Author Share Posted April 17, 2015 Problem is in PIXI.Text. It calculates text height with rendering character "M" (capital M and it's not configurable), and it probably is not enough to cover those umlaut dots. You probably could patch that part of code or do some workaround as I did. It's a bit silly workaround: Add line feed to text (\n) to make it larger. Still not good, so offset with lineSpacing 10 or something fitting. You need to readjust the text position as it goes a bit off, but atleast text displays correctly.Oh, I hadn't thought that that could be the reason. Always learning something new.. This was really helpful, thank you! Link to comment Share on other sites More sharing options...
stupot Posted April 17, 2015 Share Posted April 17, 2015 Is it only on this 1 device with phaser V2.2.x that you have problems and that it's ok on other devices with higher Phaser versions? As a quick test, could you try just using the system 'Arial' font, it will handle pretty much anything you want - if that works then check your webfont contains the characters you require. I use V2.2.x and 2.3.x with these characters without problem. Link to comment Share on other sites More sharing options...
jouniii Posted July 13, 2015 Share Posted July 13, 2015 Getting back to old thread. I suspect it's just depending font. You probably need try try with Arial and capital ÄÖÅ if it's an issue. In anycase, I have not tested with the new Phaser.Text if it's fixing this problem. I saw this in the issues (the padding property should "do" the same trick with better results): https://github.com/photonstorm/phaser/issues/1518 Link to comment Share on other sites More sharing options...
Recommended Posts