jdnichollsc Posted July 22, 2015 Share Posted July 22, 2015 Hi guys, How can I to set italic and bold words with position like the following example? => http://phaser.io/examples/v2/text/colored-characters Example: "Hello everyone, I'm testing the text in Phaser" Thanks in advance, Nicholls Link to comment Share on other sites More sharing options...
jdnichollsc Posted July 27, 2015 Author Share Posted July 27, 2015 Hi guys, I need help please, see my example: http://codepen.io/jdnichollsc/pen/BNJeYB?editors=001 But the sentence is cut Any help will be much appreciated, Nicholls Link to comment Share on other sites More sharing options...
Langerz82 Posted July 27, 2015 Share Posted July 27, 2015 It's a bit of a bug I think the text renderer is clipping the end. If you add two spaces on the end you can see the exclamation mark. jdnichollsc 1 Link to comment Share on other sites More sharing options...
jdnichollsc Posted July 27, 2015 Author Share Posted July 27, 2015 Thanks for your quickly response my friend! Yes, but it is not a good solution Another solution would be this => font: "bold 60px Arial",create: function(){ this.hello = new myText( this.game, this.game.world.centerX, this.game.world.centerY, "Hello World, this is Phaser 2.4.1!", { font: "bold 60px Arial", //all text in bold from the beginning align: "center", fill: "#ffffff" }); this.hello.anchor.set(0.5); this.hello.addFontWeight('normal', 0); this.hello.addColor('red', 6); this.hello.addFontWeight('bold', 6); this.hello.addColor('white', 11); this.hello.addFontWeight('normal', 11); this.hello.addColor('blue', 21); this.hello.addFontStyle('italic', 21); this.hello.addFontWeight('bold', 21);}But it is not the best solution hahaha Thanks in advance Link to comment Share on other sites More sharing options...
Recommended Posts