oddskill Posted November 21, 2014 Report Share Posted November 21, 2014 Hello. When using ttf fonts in Phaser i miss the possibility to add a letter-spacing parameter for the style.Do i miss something or is that not available ? Would be a nice thing to have. best regards odd Quote Link to comment Share on other sites More sharing options...
pumuky Posted November 25, 2014 Report Share Posted November 25, 2014 Hello,It's not available. Here is and example to emulate this feature using canvas:http://jsfiddle.net/davidhong/hKbJ4/ Quote Link to comment Share on other sites More sharing options...
kleepklep Posted September 10, 2015 Report Share Posted September 10, 2015 I know this is an old post but it's still relevant, so here is a little trick I came with if you want something simpler. What I'm doing is taking my original text string and adding hair spaces in between the letters. It might not work for all fonts but it works great with the one I'm using. You can make the letters move further apart by using more hair spaces, em spaces, or another type of space. I copied and pasted from https://www.cs.tut.fi/~jkorpela/chars/spaces.html. var charCopy = '';for (var c = 0; c < chars.length; c++) { charCopy += chars.charAt(c) + ' '; // hair space}chars = charCopy.substr(0, charCopy.length - 1); 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.